Skip to content

Commit 01aaffb

Browse files
committed
Build wheels via vcpkg on manylinux_musl
1 parent d5b6790 commit 01aaffb

File tree

3 files changed

+6
-71
lines changed

3 files changed

+6
-71
lines changed

pkg/build-wheel-inside-docker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ cd apache-pulsar-client-cpp-${PULSAR_CPP_VERSION}
3333

3434
git clone https://github.com/microsoft/vcpkg.git
3535
cd vcpkg
36-
# The following dependencies are required to build vcpkg on arm64 Linux
37-
yum install -y curl zip unzip tar perl-IPC-Cmd
36+
37+
# manylinux2014 does not have ninja in the system package manager
3838
git clone https://github.com/ninja-build/ninja.git
3939
cd ninja
4040
git checkout release
41-
/opt/python/cp312-cp312/bin/python configure.py --bootstrap
41+
./configure.py --bootstrap
4242
mv ninja /usr/bin/
4343
cd ..
4444
./bootstrap-vcpkg.sh

pkg/manylinux2014/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ RUN pip3 install pyyaml setuptools
3939
ADD .build/dependencies.yaml /
4040
ADD .build/dep-version.py /usr/local/bin
4141
ADD .build/dep-url.sh /
42+
43+
RUN yum install -y curl zip unzip tar perl-IPC-Cmd

pkg/manylinux_musl/Dockerfile

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -35,75 +35,8 @@ ENV PYTHON_LIBRARIES /opt/python/${PYTHON_SPEC}/lib/python${PYTHON_VERSION}
3535

3636
RUN pip install pyyaml setuptools
3737

38-
RUN apk add cmake
39-
4038
ADD .build/dependencies.yaml /
4139
ADD .build/dep-version.py /usr/local/bin
4240
ADD .build/dep-url.sh /
4341

44-
# Download and install boost
45-
RUN BOOST_VERSION=$(dep-version.py boost) && \
46-
BOOST_VERSION_UNDESRSCORE=$(echo $BOOST_VERSION | sed 's/\./_/g') && \
47-
. /dep-url.sh && download_dependency /dependencies.yaml boost && \
48-
cp -r boost_${BOOST_VERSION_UNDESRSCORE}/boost /usr/include/ && \
49-
rm -rf /boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz /boost_${BOOST_VERSION_UNDESRSCORE}
50-
51-
# Download and compile protobuf
52-
RUN PROTOBUF_VERSION=$(dep-version.py protobuf) && \
53-
. /dep-url.sh && download_dependency /dependencies.yaml protobuf && \
54-
cd protobuf-${PROTOBUF_VERSION}/ && \
55-
CXXFLAGS=-fPIC ./configure && \
56-
make -j8 && make install && \
57-
rm -rf /protobuf-cpp-${PROTOBUF_VERSION}.tar.gz /protobuf-${PROTOBUF_VERSION}
58-
59-
# ZLib
60-
RUN ZLIB_VERSION=$(dep-version.py zlib) && \
61-
. /dep-url.sh && download_dependency /dependencies.yaml zlib && \
62-
cd zlib-${ZLIB_VERSION} && \
63-
CFLAGS="-fPIC -O3" ./configure && \
64-
make -j8 && make install && \
65-
rm -rf /v${ZLIB_VERSION}.tar.gz /zlib-${ZLIB_VERSION}
66-
67-
# Zstandard
68-
RUN ZSTD_VERSION=$(dep-version.py zstd) && \
69-
. /dep-url.sh && download_dependency /dependencies.yaml zstd && \
70-
cd zstd-${ZSTD_VERSION} && \
71-
CFLAGS="-fPIC -O3" make -j8 && \
72-
make install && \
73-
rm -rf /zstd-${ZSTD_VERSION} /zstd-${ZSTD_VERSION}.tar.gz
74-
75-
# Snappy
76-
RUN SNAPPY_VERSION=$(dep-version.py snappy) && \
77-
. /dep-url.sh && download_dependency /dependencies.yaml snappy && \
78-
cd snappy-${SNAPPY_VERSION} && \
79-
CXXFLAGS="-fPIC -O3" cmake . -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF && \
80-
make -j8 && make install && \
81-
rm -rf /snappy-${SNAPPY_VERSION} /${SNAPPY_VERSION}.tar.gz
82-
83-
RUN OPENSSL_VERSION=$(dep-version.py openssl) && \
84-
OPENSSL_VERSION_UNDERSCORE=$(echo $OPENSSL_VERSION | sed 's/\./_/g') && \
85-
. /dep-url.sh && download_dependency /dependencies.yaml openssl && \
86-
cd openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}/ && \
87-
./config -fPIC --prefix=/usr/local/ssl/ && \
88-
make -j8 && make install && \
89-
rm -rf /OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz /openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
90-
91-
ENV LD_LIBRARY_PATH /usr/local/ssl/lib/:/usr/local/lib
92-
ENV OPENSSL_ROOT_DIR /usr/local/ssl/
93-
94-
# LibCurl
95-
RUN CURL_VERSION=$(dep-version.py curl) && \
96-
. /dep-url.sh && download_dependency /dependencies.yaml curl && \
97-
cd curl-${CURL_VERSION} && \
98-
CFLAGS=-fPIC ./configure --with-ssl=/usr/local/ssl/ --without-zstd && \
99-
make -j8 && make install && \
100-
rm -rf /curl-${CURL_VERSION}.tar.gz /curl-${CURL_VERSION}
101-
102-
# Pulsar client C++
103-
RUN PULSAR_CPP_VERSION=$(dep-version.py pulsar-cpp) && \
104-
. /dep-url.sh && download_dependency /dependencies.yaml pulsar-cpp && \
105-
cd apache-pulsar-client-cpp-${PULSAR_CPP_VERSION} && \
106-
cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_STATIC_LIB=OFF -DLINK_STATIC=ON && \
107-
make -j8 && \
108-
make install && \
109-
rm -rf apache-pulsar-client-cpp-${PULSAR_CPP_VERSION} apache-pulsar-client-cpp-${PULSAR_CPP_VERSION}.tar.gz
42+
RUN apk add build-base cmake ninja zip unzip curl git

0 commit comments

Comments
 (0)