You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gu...@apache.org on 2020/04/15 08:48:52 UTC

[pulsar] 03/03: [python client]Support generate pulsar-client for python3.8 (#6741)

This is an automated email from the ASF dual-hosted git repository.

guangning pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit c36170c3acc0bd432036baf7d9471a4c34320395
Author: guangning <gu...@apache.org>
AuthorDate: Wed Apr 15 16:27:29 2020 +0800

    [python client]Support generate pulsar-client for python3.8 (#6741)
    
    * Support pulsar-client for python3.8
    
    * Fixed python38
    
    (cherry picked from commit ab1f40de56a4c43653911626d7709b54766487f9)
---
 pulsar-client-cpp/docker/Dockerfile       |  2 +-
 pulsar-client-cpp/docker/build-wheels.sh  |  1 +
 pulsar-client-cpp/docker/create-images.sh |  1 +
 pulsar-client-cpp/docker/push-images.sh   |  1 +
 pulsar-client-cpp/python/CMakeLists.txt   | 10 ++++++++--
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/pulsar-client-cpp/docker/Dockerfile b/pulsar-client-cpp/docker/Dockerfile
index 043ebf0..e3458f6 100644
--- a/pulsar-client-cpp/docker/Dockerfile
+++ b/pulsar-client-cpp/docker/Dockerfile
@@ -153,7 +153,7 @@ RUN curl -O -L https://github.com/facebook/zstd/releases/download/v1.3.7/zstd-1.
 RUN curl -O -L https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz && \
     tar xvfz snappy-1.1.3.tar.gz && \
     cd snappy-1.1.3 && \
-    CFLAGS="-fPIC -O3" ./configure && \
+    CXXFLAGS="-fPIC -O3" ./configure && \
     make && make install && \
     rm -rf /snappy-1.1.3 /snappy-1.1.3.tar.gz
 
diff --git a/pulsar-client-cpp/docker/build-wheels.sh b/pulsar-client-cpp/docker/build-wheels.sh
index 7a892c0..1007b29 100755
--- a/pulsar-client-cpp/docker/build-wheels.sh
+++ b/pulsar-client-cpp/docker/build-wheels.sh
@@ -33,6 +33,7 @@ PYTHON_VERSIONS=(
    '3.5 cp35-cp35m'
    '3.6 cp36-cp36m'
    '3.7 cp37-cp37m'
+   '3.8 cp38-cp38'
 )
 
 function contains() {
diff --git a/pulsar-client-cpp/docker/create-images.sh b/pulsar-client-cpp/docker/create-images.sh
index 5d17f22..34136c1 100755
--- a/pulsar-client-cpp/docker/create-images.sh
+++ b/pulsar-client-cpp/docker/create-images.sh
@@ -30,6 +30,7 @@ PYTHON_VERSIONS=(
    '3.5 cp35-cp35m'
    '3.6 cp36-cp36m'
    '3.7 cp37-cp37m'
+   '3.8 cp38-cp38'
 )
 
 for line in "${PYTHON_VERSIONS[@]}"; do
diff --git a/pulsar-client-cpp/docker/push-images.sh b/pulsar-client-cpp/docker/push-images.sh
index 15d0ac4..155becd 100755
--- a/pulsar-client-cpp/docker/push-images.sh
+++ b/pulsar-client-cpp/docker/push-images.sh
@@ -32,6 +32,7 @@ PYTHON_VERSIONS=(
    '3.5 cp35-cp35m'
    '3.6 cp36-cp36m'
    '3.7 cp37-cp37m'
+   '3.8 cp38-cp38'
 )
 
 for line in "${PYTHON_VERSIONS[@]}"; do
diff --git a/pulsar-client-cpp/python/CMakeLists.txt b/pulsar-client-cpp/python/CMakeLists.txt
index 1cbc972..17cdf42 100644
--- a/pulsar-client-cpp/python/CMakeLists.txt
+++ b/pulsar-client-cpp/python/CMakeLists.txt
@@ -44,15 +44,21 @@ if (NOT DEFINED ${Boost_PYTHON37-MT_LIBRARY})
   set(Boost_PYTHON37-MT_LIBRARY ${Boost_PYTHON37_LIBRARY})
 endif()
 
+if (NOT DEFINED ${Boost_PYTHON38-MT_LIBRARY})
+  set(Boost_PYTHON38-MT_LIBRARY ${Boost_PYTHON38_LIBRARY})
+endif()
+
 # Try all possible boost-python variable namings
 set(PYTHON_WRAPPER_LIBS ${Boost_PYTHON_LIBRARY} ${Boost_PYTHON3_LIBRARY}
                         ${Boost_PYTHON27-MT_LIBRARY} ${Boost_PYTHON37-MT_LIBRARY}
                         ${Boost_PYTHON34_LIBRARY} ${Boost_PYTHON35_LIBRARY}
-                        ${Boost_PYTHON36_LIBRARY})
+                        ${Boost_PYTHON36_LIBRARY} ${Boost_PYTHON38_LIBRARY})
 
 if (APPLE)
     set(PYTHON_WRAPPER_LIBS ${PYTHON_WRAPPER_LIBS}
-                         ${Boost_PYTHON27-MT_LIBRARY_RELEASE} ${Boost_PYTHON37-MT_LIBRARY_RELEASE})
+                         ${Boost_PYTHON27-MT_LIBRARY_RELEASE}
+                         ${Boost_PYTHON37-MT_LIBRARY_RELEASE}
+                         ${Boost_PYTHON38-MT_LIBRARY_RELEASE})
 
     if (LINK_STATIC)
         # When linking statically on MacOS, include also libicu since it's now required by boost::regex