Skip to content

Upgrade the C++ client to 3.7.0 #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2025
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