From 6be623144482cedd28446c7d1be86d399bec3aeb Mon Sep 17 00:00:00 2001 From: Evan Pitstick Date: Fri, 25 Aug 2023 08:06:08 +0300 Subject: [PATCH 1/2] 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. --- plugins/python-build/bin/python-build | 2 +- plugins/python-build/test/pyenv_ext.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 20b17342..531d8eb3 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -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 } diff --git a/plugins/python-build/test/pyenv_ext.bats b/plugins/python-build/test/pyenv_ext.bats index a2b73f61..ccf6f4c6 100644 --- a/plugins/python-build/test/pyenv_ext.bats +++ b/plugins/python-build/test/pyenv_ext.bats @@ -200,7 +200,7 @@ OUT assert_success assert_build_log < Date: Sun, 27 Aug 2023 20:23:37 +0300 Subject: [PATCH 2/2] gitignore the bulid directory for tests --- plugins/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/.gitignore b/plugins/.gitignore index e2092085..acd0fcce 100644 --- a/plugins/.gitignore +++ b/plugins/.gitignore @@ -2,3 +2,4 @@ !/.gitignore !/version-ext-compat !/python-build +/python-build/test/build