From ce671398f8fc610a9b0908c2d63d658fbefafec2 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Sat, 18 Jul 2015 14:22:58 +0900 Subject: [PATCH] Ignore user's site-packages on ensurepip/get-pip (#411) https://www.python.org/dev/peps/pep-0370/ --- plugins/python-build/bin/python-build | 4 ++-- plugins/python-build/test/pyenv_ext.bats | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 15f8a759..8906b875 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1552,7 +1552,7 @@ build_package_get_pip() { http get "${GET_PIP_URL}" fi } 1> "${get_pip}" - "${PYTHON_BIN}" "${get_pip}" ${GET_PIP_OPTS} 1>&4 2>&1 || { + "${PYTHON_BIN}" -s "${get_pip}" ${GET_PIP_OPTS} 1>&4 2>&1 || { echo "error: failed to install pip via get-pip.py" >&2 return 1 } @@ -1565,7 +1565,7 @@ build_package_ensurepip() { ensurepip_opts="--altinstall" fi # FIXME: `--altinstall` with `get-pip.py` - "$PYTHON_BIN" -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1 + "$PYTHON_BIN" -s -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1 } version() { diff --git a/plugins/python-build/test/pyenv_ext.bats b/plugins/python-build/test/pyenv_ext.bats index ec3395d2..31f8e5b9 100644 --- a/plugins/python-build/test/pyenv_ext.bats +++ b/plugins/python-build/test/pyenv_ext.bats @@ -178,7 +178,7 @@ OUT assert_success assert_build_log <