Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

pulsar-cpp: 3.5.1
pulsar-cpp: 3.7.0
pybind11: 2.10.1
# The OpenSSL dependency is only used when building Python from source
openssl: 1.1.1q
32 changes: 23 additions & 9 deletions pkg/build-wheel-inside-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,32 @@ cd /pulsar-client-python
source build-support/dep-url.sh

# Build cpp wheels
if [[ $ARCH == "aarch64" ]]; then
export VCPKG_FORCE_SYSTEM_BINARIES=1
fi
PULSAR_CPP_VERSION=$(cat ./dependencies.yaml | grep pulsar-cpp | awk '{print $2}')

if [ $CPP_BINARY_TYPE == "rpm" ]; then
if [ $ARCH == "aarch64" ]; then
RPM_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/rpm-arm64/aarch64
else
RPM_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/rpm-x86_64/x86_64
fi
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-$PULSAR_CPP_VERSION-1.$ARCH.rpm
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-devel-$PULSAR_CPP_VERSION-1.$ARCH.rpm
curl -O -L $RPM_ROOT_DIR/apache-pulsar-client-debuginfo-$PULSAR_CPP_VERSION-1.$ARCH.rpm
rpm -ivh *.rpm
# The pre-built RPM packages have incompatible ABI with manylinux2014, so we have to build from source
download_dependency ./dependencies.yaml pulsar-cpp
cd apache-pulsar-client-cpp-${PULSAR_CPP_VERSION}

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg

# manylinux2014 does not have ninja in the system package manager
git clone https://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
mv ninja /usr/bin/
cd ..
./bootstrap-vcpkg.sh
cd ..
cmake -B build-cpp -DINTEGRATE_VCPKG=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DYNAMIC_LIB=ON -DBUILD_STATIC_LIB=ON
cmake --build build-cpp -j8 --target install
cd ..
rm -rf apache-pulsar-client-cpp-$(PULSAR_CPP_VERSION)
else # apk
if [ $ARCH == "aarch64" ]; then
APK_ROOT_DIR=$(pulsar_cpp_base_url $PULSAR_CPP_VERSION)/apk-arm64/aarch64
Expand Down
2 changes: 2 additions & 0 deletions pkg/manylinux2014/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ ENV PATH="/opt/python/${PYTHON_SPEC}/bin:${PATH}"
ENV ARCH=${ARCH}

RUN pip3 install setuptools
# Dependencies for vcpkg on arm64 architecture
RUN yum install -y curl zip unzip tar perl-IPC-Cmd
Loading