Parcourir la source

Use -I with ensurepip

The -s flag assures that nothing can be installed to user site-packages
but doesn't keep ensurepip from looking there for Pip.
If Pip is installed in the user site-packages directory, pip won't be installed
for the newly built python -- and its shim won't be created.
-I makes the build install Pip in any case.
The user site-packages installation will override it --
but we'll have the shim at least.
pull/2764/head
Evan Pitstick il y a 2 ans
committed by Ivan Pozdeev
Parent
révision
6be6231444
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. +1
    -1
      plugins/python-build/bin/python-build
  2. +2
    -2
      plugins/python-build/test/pyenv_ext.bats

+ 1
- 1
plugins/python-build/bin/python-build Voir le fichier

@ -2025,7 +2025,7 @@ build_package_ensurepip() {
ensurepip_opts="--altinstall"
fi
# FIXME: `--altinstall` with `get-pip.py`
"$PYTHON_BIN" -s -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
"$PYTHON_BIN" -I -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
build_package_symlink_version_suffix
}

+ 2
- 2
plugins/python-build/test/pyenv_ext.bats Voir le fichier

@ -200,7 +200,7 @@ OUT
assert_success
assert_build_log <<OUT
python -s -m ensurepip
python -I -m ensurepip
OUT
}
@ -218,7 +218,7 @@ OUT
assert_success
assert_build_log <<OUT
python -s -m ensurepip --altinstall
python -I -m ensurepip --altinstall
OUT
}

Chargement…
Annuler
Enregistrer