THRIFT-2103 [python] Support for SSL certificates with Subject Alternative Names
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 3198db4..46e4d79 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -103,8 +103,9 @@
 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" OFF)
+                       "BUILD_LIBRARIES;WITH_PYTHON;PYTHONLIBS_FOUND;PIP_FOUND" OFF)
 
 # Haskell
 option(WITH_HASKELL "Build Haskell Thrift library" ON)
diff --git a/build/docker/debian/Dockerfile b/build/docker/debian/Dockerfile
index ed5d348..b9e1da7 100644
--- a/build/docker/debian/Dockerfile
+++ b/build/docker/debian/Dockerfile
@@ -63,8 +63,8 @@
       python-support \
       python-twisted \
       python-zope.interface \
-      python-six \
-      python3-six
+      python-pip \
+      python3-pip
 
 # Ruby dependencies
 RUN apt-get update && apt-get install -y \
diff --git a/build/docker/ubuntu/Dockerfile b/build/docker/ubuntu/Dockerfile
index 55c6a02..64baba9 100644
--- a/build/docker/ubuntu/Dockerfile
+++ b/build/docker/ubuntu/Dockerfile
@@ -63,8 +63,8 @@
       python-support \
       python-twisted \
       python-zope.interface \
-      python-six \
-      python3-six
+      python-pip \
+      python3-pip
 
 # Ruby dependencies
 RUN apt-get update && apt-get install -y \