summaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2021-01-23 19:39:40 +0100
committerMatt Clay <matt@mystile.com>2021-01-23 20:45:53 +0100
commit484e4af4d0b0f8ba88f73c20f592bb107eb9396a (patch)
tree9194ab745c93288d9cf746ec2fb6ac915a4fd9c3 /test/lib
parentjson_query: Update documentation (#73302) (diff)
downloadansible-484e4af4d0b0f8ba88f73c20f592bb107eb9396a.tar.xz
ansible-484e4af4d0b0f8ba88f73c20f592bb107eb9396a.zip
Handle get-pip.py breaking change on Python 2.7.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/ansible_test/_data/setup/remote.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_data/setup/remote.sh b/test/lib/ansible_test/_data/setup/remote.sh
index a08b349229..05cb7c6061 100644
--- a/test/lib/ansible_test/_data/setup/remote.sh
+++ b/test/lib/ansible_test/_data/setup/remote.sh
@@ -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