Skip to content

Commit f1b966e

Browse files
committed
Workaround for get-pip when pip+setuptools present
Ref: pypa/pip#10742
1 parent 3155217 commit f1b966e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: tools/install_pip.sh

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ function install_get_pip {
8989
die $LINENO "Download of get-pip.py failed"
9090
touch $LOCAL_PIP.downloaded
9191
fi
92+
# Workaround when pip + setuptools is present alognside distutils
93+
# ref: https://github.com/pypa/pip/issues/10742
94+
# Is idempotent for setuptools but will fail when pip is not present
95+
sudo -H -E python${PYTHON3_VERSION} -m pip uninstall setuptools -y || true
9296
sudo -H -E python${PYTHON3_VERSION} $LOCAL_PIP
9397
}
9498

0 commit comments

Comments
 (0)