You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-31046: Fix ensurepip script shebangs with --root
When using `python -m ensurepip` with the `--root` option for staged
installations, the generated pip script contained an incorrect shebang
that pointed into the staging directory. This made the installation
unusable once the staging directory was removed.
This commit fixes the issue by using the internal pip `--executable`
option to force the shebang to point to the correct, final
interpreter path.
It also corrects related pathing issues:
- Removes the check that incorrectly disallowed using --root and
--prefix together.
- Defaults the installation prefix to `/` when --root is used alone,
ensuring installation occurs at the base of the staging directory.
References: python#17634 (comment)
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
0 commit comments