Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-2.8] Handle get-pip.py breaking change on Python 2.7. #73343

Merged
merged 1 commit into from Jan 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/ansible-test-pip-bootstrap.yml
@@ -0,0 +1,2 @@
bugfixes:
- ansible-test - The ``--remote`` option has been updated for Python 2.7 to work around breaking changes in the newly released ``get-pip.py`` bootstrapper.
10 changes: 9 additions & 1 deletion test/runner/setup/remote.sh
Expand Up @@ -10,7 +10,15 @@ cd ~/

install_pip () {
if ! "${python_interpreter}" -m pip.__main__ --version --disable-pip-version-check 2>/dev/null; then
curl --silent --show-error https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
case "${python_version}" in
"2.7")
pip_bootstrap_url="https://bootstrap.pypa.io/${python_version}/get-pip.py"
;;
*)
pip_bootstrap_url="https://bootstrap.pypa.io/get-pip.py"
;;
esac
curl --silent --show-error "${pip_bootstrap_url}" -o /tmp/get-pip.py
"${python_interpreter}" /tmp/get-pip.py --disable-pip-version-check --quiet
rm /tmp/get-pip.py
fi
Expand Down