Skip to content

Commit

Permalink
[docker] Update pip install
Browse files Browse the repository at this point in the history
It looks like Python has adjusted the get-pip.py URL to no longer
support Python 2.7. This patch updates the Docker scripts to
use the 2.7 specific URL and drop the old 2.6 speicific url now
that no supported images use Python 2.6.

Change-Id: Ia9a22e5084f8a5973d26372372f2ead4c46dcda9
Reviewed-on: http://gerrit.cloudera.org:8080/16984
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
  • Loading branch information
granthenke committed Jan 28, 2021
1 parent a62bfa3 commit b5e7362
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker/bootstrap-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [[ -f "/usr/bin/yum" ]]; then
# to install the ninja-build package.
if [[ "$OS_MAJOR_VERSION" -gt "7" ]]; then
yum install -y 'dnf-command(config-manager)'
yum config-manager --set-enabled PowerTools
yum config-manager --set-enabled powertools
fi

# Install libraries often used for Kudu development and build performance.
Expand Down
13 changes: 6 additions & 7 deletions docker/bootstrap-python-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ function install_python_packages() {
# We use get-pip.py to bootstrap pip outside of system packages.
# This prevents issues with the platform package manager knowing
# about only some of the python packages.
if [[ "$PYTHON_MAJOR" == "2" && "$PYTHON_MINOR" == "6" ]]; then
# Beginning with pip 10, Python 2.6 is no longer supported.
curl https://bootstrap.pypa.io/2.6/get-pip.py | python
if [[ "$PYTHON_MAJOR" == "2" && "$PYTHON_MINOR" == "7" ]]; then
# The standard get-pip.py URL no longer supports Python 2.7,
# so we need to use the version specific one.
curl https://bootstrap.pypa.io/2.7/get-pip.py | python
else
# Use a stable version of pip that works with the remaining
# versions of Python 2 and 3. pip 19.1 doesn't support Python 3.4,
# which is the version of Python 3 shipped with Ubuntu 14.04.
curl https://bootstrap.pypa.io/get-pip.py | python - "pip < 19.0"
# Use a stable version of pip that works with Python 2 and 3.
curl https://bootstrap.pypa.io/get-pip.py | python - "pip < 20.3.4"
fi
pip install --upgrade \
cython \
Expand Down

0 comments on commit b5e7362

Please sign in to comment.