You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by je...@apache.org on 2019/10/21 22:21:37 UTC

[pulsar] 01/01: Revert "Build python 37 artifacts and use them for the docker image (#5335)"

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

jerrypeng pushed a commit to branch revert-5335-python371
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit efbbd139ff9707304e8f95526ca5ae7c4ee85eab
Author: Boyang Jerry Peng <je...@gmail.com>
AuthorDate: Mon Oct 21 15:21:21 2019 -0700

    Revert "Build python 37 artifacts and use them for the docker image (#5335)"
    
    This reverts commit e8adb0aa5a524c1eddda7607ab979192f293cfc2.
---
 docker/pulsar/Dockerfile                                 | 16 +++++++++++-----
 docker/pulsar/pom.xml                                    |  4 ++--
 ...l-pulsar-client-37.sh => install-pulsar-client-35.sh} |  4 ++--
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/docker/pulsar/Dockerfile b/docker/pulsar/Dockerfile
index d4b8646..de4470b 100644
--- a/docker/pulsar/Dockerfile
+++ b/docker/pulsar/Dockerfile
@@ -32,7 +32,7 @@ COPY scripts/pulsar-zookeeper-ruok.sh /pulsar/bin
 COPY scripts/watch-znode.py /pulsar/bin
 COPY scripts/set_python_version.sh /pulsar/bin
 COPY scripts/install-pulsar-client-27.sh /pulsar/bin
-COPY scripts/install-pulsar-client-37.sh /pulsar/bin
+COPY scripts/install-pulsar-client-35.sh /pulsar/bin
 
 
 ### Create 2nd stage from OpenJDK image
@@ -44,21 +44,27 @@ COPY --from=pulsar /pulsar /pulsar
 # Install some utilities
 RUN apt-get update \
      && apt-get install -y netcat dnsutils less procps iputils-ping \
-                 python2.7 python-setuptools python-yaml python-kazoo \
-                 python3.7 python3-setuptools python3-yaml python3-kazoo \
+                 python2.7 python-setuptools \
+                 python3-setuptools \
                  libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
                  curl \
      && apt-get clean \
      && rm -rf /var/lib/apt/lists/*
 
+# Install python3.5.6
+RUN curl -O -L https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz
+RUN tar -zxvf Python-3.5.6.tgz
+RUN cd Python-3.5.6 && ./configure --enable-optimizations && make altinstall
+
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 RUN python2.7 get-pip.py
-RUN python3.7 get-pip.py
+RUN pip install kazoo pyyaml
+RUN python3.5 get-pip.py
 
 ADD target/python-client/ /pulsar/pulsar-client
 ADD target/cpp-client/ /pulsar/cpp-client
 RUN /pulsar/bin/install-pulsar-client-27.sh
-RUN /pulsar/bin/install-pulsar-client-37.sh
+RUN /pulsar/bin/install-pulsar-client-35.sh
 RUN echo networkaddress.cache.ttl=1 >> $JAVA_HOME/jre/lib/security/java.security
 RUN apt-get update \
      && apt install -y /pulsar/cpp-client/*.deb \
diff --git a/docker/pulsar/pom.xml b/docker/pulsar/pom.xml
index 4af9a77..cc0d783 100644
--- a/docker/pulsar/pom.xml
+++ b/docker/pulsar/pom.xml
@@ -80,8 +80,8 @@
                   <workingDirectory>${project.basedir}/target</workingDirectory>
                   <executable>${project.basedir}/../../pulsar-client-cpp/docker/build-wheels.sh</executable>
                   <arguments>
-                    <!-- build python 3.7 -->
-                    <argument>3.7 cp37-cp37m</argument>
+                    <!-- build python 3.5 -->
+                    <argument>3.5 cp35-cp35m</argument>
                   </arguments>
                 </configuration>
               </execution>
diff --git a/docker/pulsar/scripts/install-pulsar-client-37.sh b/docker/pulsar/scripts/install-pulsar-client-35.sh
similarity index 88%
rename from docker/pulsar/scripts/install-pulsar-client-37.sh
rename to docker/pulsar/scripts/install-pulsar-client-35.sh
index 9d3714c..058eefd 100755
--- a/docker/pulsar/scripts/install-pulsar-client-37.sh
+++ b/docker/pulsar/scripts/install-pulsar-client-35.sh
@@ -20,5 +20,5 @@
 
 set -x
 
-WHEEL_FILE=$(ls /pulsar/pulsar-client | grep cp37)
-pip3.7 install /pulsar/pulsar-client/${WHEEL_FILE}
+WHEEL_FILE=$(ls /pulsar/pulsar-client | grep cp35)
+pip3.5 install /pulsar/pulsar-client/${WHEEL_FILE}