From 45b45bcf255adc6bbbc64ec9487e4b477d1359ad Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Sat, 18 Oct 2014 23:56:51 +0900 Subject: [PATCH] Pass `--altinstall` to `ensurepip` (#255) --- plugins/python-build/bin/python-build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index c7c1d20e..c9cc5080 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1443,7 +1443,11 @@ build_package_get_pip() { } build_package_ensurepip() { - "$PYTHON_BIN" -m ensurepip 1>/dev/null 2>&1 || { + local ensurepip_opts + if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then + ensurepip_opts="--altinstall" + fi + "$PYTHON_BIN" -m ensurepip $ensurepip_opts 1>/dev/null 2>&1 || { build_package_ez_setup "$@" && build_package_get_pip "$@" } || return 1