This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch fix-python-build in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
commit f0bd71a57aaf1e7738f07dd732c22490ba15b210 Author: Matteo Merli <[email protected]> AuthorDate: Mon Jun 18 17:03:22 2018 -0700 Fixed python extension build --- pulsar-client-cpp/docker/build-wheel-file-within-docker.sh | 14 +++++++++----- pulsar-client-cpp/docker/build-wheels.sh | 2 +- pulsar-client-cpp/python/setup.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh b/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh index d550ca9..d4cb9af 100755 --- a/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh +++ b/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh @@ -1,4 +1,5 @@ #!/bin/bash + # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -18,19 +19,22 @@ # under the License. # -set -e +set -e -x cd /pulsar/pulsar-client-cpp -find . -name CMakeCache.txt | xargs rm -find . -name CMakeFiles | xargs rm -rf +find . -name CMakeCache.txt | xargs -r rm +find . -name CMakeFiles | xargs -r rm -rf cmake . -DPYTHON_INCLUDE_DIR=/opt/python/$PYTHON_SPEC/include/python$PYTHON_VERSION \ -DPYTHON_LIBRARY=/opt/python/$PYTHON_SPEC/lib \ - -DLINK_STATIC=ON + -DLINK_STATIC=ON \ + -DBUILD_TESTS=OFF make clean -make _pulsar +make _pulsar -j3 cd python python setup.py bdist_wheel + +auditwheel repair dist/pulsar_client-*-$PYTHON_SPEC-linux_x86_64.whl diff --git a/pulsar-client-cpp/docker/build-wheels.sh b/pulsar-client-cpp/docker/build-wheels.sh index 35cb789..2146869 100755 --- a/pulsar-client-cpp/docker/build-wheels.sh +++ b/pulsar-client-cpp/docker/build-wheels.sh @@ -44,5 +44,5 @@ for line in "${PYTHON_VERSIONS[@]}"; do IMAGE_NAME=$BUILD_IMAGE_NAME:manylinux-$PYTHON_SPEC echo "Using image: $IMAGE_NAME" - docker run -i -v $PWD:/pulsar $IMAGE_NAME /build-wheel-file-within-docker.sh + docker run -i -v $PWD:/pulsar $IMAGE_NAME /pulsar/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh done diff --git a/pulsar-client-cpp/python/setup.py b/pulsar-client-cpp/python/setup.py index ab91f0f..b20f3d6 100644 --- a/pulsar-client-cpp/python/setup.py +++ b/pulsar-client-cpp/python/setup.py @@ -60,7 +60,7 @@ class my_build_ext(build_ext.build_ext): setup( name="pulsar-client", version=VERSION, - py_modules=['pulsar'], + packages=['pulsar', 'pulsar.functions'], cmdclass={'build_ext': my_build_ext}, ext_modules=[Extension('_pulsar', [])],
