THRIFT-3910 Do not invoke pip as part of build process
This closes #1073
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 01dae35..6dd59e0 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -103,9 +103,8 @@
option(WITH_PYTHON "Build Python Thrift library" ON)
find_package(PythonInterp QUIET) # for Python executable
find_package(PythonLibs QUIET) # for Python.h
-find_package(Pip QUIET)
CMAKE_DEPENDENT_OPTION(BUILD_PYTHON "Build Python library" ON
- "BUILD_LIBRARIES;WITH_PYTHON;PYTHONLIBS_FOUND;PIP_FOUND" OFF)
+ "BUILD_LIBRARIES;WITH_PYTHON;PYTHONLIBS_FOUND" OFF)
# Haskell
option(WITH_HASKELL "Build Haskell Thrift library" ON)
diff --git a/build/cmake/FindPip.cmake b/build/cmake/FindPip.cmake
deleted file mode 100644
index 45fdb99..0000000
--- a/build/cmake/FindPip.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-
-# PIP_FOUND - system has pip
-# PIP_EXECUTABLE - the pip executable
-#
-# It will search the PATH environment variable
-
-include(FindPackageHandleStandardArgs)
-
-find_program(PIP_EXECUTABLE NAMES pip)
-find_package_handle_standard_args(PIP DEFAULT_MSG PIP_EXECUTABLE)
-mark_as_advanced(PIP_EXECUTABLE)
diff --git a/build/docker/centos/Dockerfile b/build/docker/centos/Dockerfile
index f544a24..a31492b 100644
--- a/build/docker/centos/Dockerfile
+++ b/build/docker/centos/Dockerfile
@@ -56,9 +56,11 @@
# Python Dependencies
RUN yum install -y \
python-devel \
+ python-pip \
python-setuptools \
- python-twisted-web \
- python-pip
+ python-six \
+ python-twisted-web && \
+ pip install -U backports.ssl_match_hostname ipaddress tornado
# Ruby Dependencies
RUN yum install -y \
diff --git a/build/docker/centos6/Dockerfile b/build/docker/centos6/Dockerfile
index d0dc51a..4df75de 100644
--- a/build/docker/centos6/Dockerfile
+++ b/build/docker/centos6/Dockerfile
@@ -40,6 +40,9 @@
python-pip \
&& yum clean all
+# optional dependencies
+RUN pip install ipaddress backports.ssl_match_hostname tornado
+
# CMake
RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
cd cmake-3.4.1 && ./bootstrap && make -j4 && make install && \
diff --git a/build/docker/debian/Dockerfile b/build/docker/debian/Dockerfile
index 22dd3b5..285c85b 100644
--- a/build/docker/debian/Dockerfile
+++ b/build/docker/debian/Dockerfile
@@ -145,6 +145,10 @@
# Ruby
RUN gem install bundler --no-ri --no-rdoc
+# Python optional dependencies
+RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
+RUN pip3 install -U backports.ssl_match_hostname tornado
+
# Go
RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
ENV PATH /usr/local/go/bin:$PATH
diff --git a/build/docker/ubuntu/Dockerfile b/build/docker/ubuntu/Dockerfile
index 99f0a8f..2797a1c 100644
--- a/build/docker/ubuntu/Dockerfile
+++ b/build/docker/ubuntu/Dockerfile
@@ -163,6 +163,10 @@
# Ruby
RUN gem install bundler --no-ri --no-rdoc
+# Python optional dependencies
+RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
+RUN pip3 install -U backports.ssl_match_hostname tornado
+
# Go
RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
ENV PATH /usr/local/go/bin:$PATH