Skip to content

Commit 8d34a11

Browse files
authored
Merge branch 'main' into feature/base-prefix-config
2 parents 81d6053 + 1ab22ee commit 8d34a11

17 files changed

+36
-57
lines changed

NEWS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Bug Fixes
5555
- Ensure that the candidate ``pip`` executable exists, when checking for a new version of pip. (`#11309 <https://github.com/pypa/pip/issues/11309>`_)
5656
- Ignore distributions with invalid ``Name`` in metadata instead of crashing, when
5757
using the ``importlib.metadata`` backend. (`#11352 <https://github.com/pypa/pip/issues/11352>`_)
58-
- Raise RequirementsFileParseError when parsing malformed requirements options that can't be sucessfully parsed by shlex. (`#11491 <https://github.com/pypa/pip/issues/11491>`_)
58+
- Raise RequirementsFileParseError when parsing malformed requirements options that can't be successfully parsed by shlex. (`#11491 <https://github.com/pypa/pip/issues/11491>`_)
5959
- Fix build environment isolation on some system Pythons. (`#6264 <https://github.com/pypa/pip/issues/6264>`_)
6060

6161
Vendored Libraries

docs/html/cli/pip_download.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Examples
8181
8282
#. Download a package and all of its dependencies with OSX specific interpreter constraints.
8383
This forces OSX 10.10 or lower compatibility. Since OSX deps are forward compatible,
84-
this will also match ``macosx-10_9_x86_64``, ``macosx-10_8_x86_64``, ``macosx-10_8_intel``,
84+
this will also match ``macosx_10_9_x86_64``, ``macosx_10_8_x86_64``, ``macosx_10_8_intel``,
8585
etc.
8686
It will also match deps with platform ``any``. Also force the interpreter version to ``27``
8787
(or more generic, i.e. ``2``) and implementation to ``cp`` (or more generic, i.e. ``py``).
@@ -92,7 +92,7 @@ Examples
9292
9393
python -m pip download \
9494
--only-binary=:all: \
95-
--platform macosx-10_10_x86_64 \
95+
--platform macosx_10_10_x86_64 \
9696
--python-version 27 \
9797
--implementation cp \
9898
SomePackage
@@ -103,7 +103,7 @@ Examples
103103
104104
py -m pip download ^
105105
--only-binary=:all: ^
106-
--platform macosx-10_10_x86_64 ^
106+
--platform macosx_10_10_x86_64 ^
107107
--python-version 27 ^
108108
--implementation cp ^
109109
SomePackage

docs/html/development/release-process.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ to need extra work before being released, the release manager always has the
3131
option to back out the partial change prior to a release. The PR can then be
3232
reworked and resubmitted for the next release.
3333

34-
Vendoring updates will be picked up fron the ``main`` branch, as for any other
34+
Vendoring updates will be picked up from the ``main`` branch, as for any other
3535
update. Ideally, vendoring updates should be merged between releases, just like
3636
any other change. If there are outstanding updates to vendored packages, the
3737
release manager *may* at their discretion choose to do a vendoring update

docs/html/reference/installation-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ package with the following properties:
7171
```
7272

7373
- `requested`: `true` if the requirement was explicitly provided by the user, either
74-
directely via a command line argument or indirectly via a requirements file. `false`
74+
directly via a command line argument or indirectly via a requirements file. `false`
7575
if the requirement was installed as a dependency of another requirement.
7676

7777
- `requested_extras`: extras requested by the user. This field is only present when the

news/11598.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use the "venv" scheme if available to obtain prefixed lib paths.

news/c1da841b-9024-4448-9ae1-6e4a5a5952f0.trivial.rst

Whitespace-only changes.

news/d4da20f5-0ed2-480c-baa9-2490e4abdff6.trivial.rst

Whitespace-only changes.

src/pip/_internal/build_env.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818

1919
from pip import __file__ as pip_location
2020
from pip._internal.cli.spinners import open_spinner
21-
from pip._internal.locations import get_platlib, get_prefixed_libs, get_purelib
21+
from pip._internal.locations import (
22+
get_isolated_environment_lib_paths,
23+
get_platlib,
24+
get_purelib,
25+
)
2226
from pip._internal.metadata import get_default_environment, get_environment
2327
from pip._internal.utils.subprocess import call_subprocess
2428
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
@@ -37,7 +41,7 @@ def __init__(self, path: str) -> None:
3741
"nt" if os.name == "nt" else "posix_prefix",
3842
vars={"base": path, "platbase": path},
3943
)["scripts"]
40-
self.lib_dirs = get_prefixed_libs(path)
44+
self.lib_dirs = get_isolated_environment_lib_paths(path)
4145

4246

4347
def get_runnable_pip() -> str:

src/pip/_internal/index/collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def _get_index_content(link: Link, *, session: PipSession) -> Optional["IndexCon
354354
if not url.endswith("/"):
355355
url += "/"
356356
# TODO: In the future, it would be nice if pip supported PEP 691
357-
# style respones in the file:// URLs, however there's no
357+
# style responses in the file:// URLs, however there's no
358358
# standard file extension for application/vnd.pypi.simple.v1+json
359359
# so we'll need to come up with something on our own.
360360
url = urllib.parse.urljoin(url, "index.html")

src/pip/_internal/locations/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"get_bin_user",
2828
"get_major_minor_version",
2929
"get_platlib",
30-
"get_prefixed_libs",
30+
"get_isolated_environment_lib_paths",
3131
"get_purelib",
3232
"get_scheme",
3333
"get_src_prefix",
@@ -482,13 +482,13 @@ def _looks_like_apple_library(path: str) -> bool:
482482
return path == f"/Library/Python/{get_major_minor_version()}/site-packages"
483483

484484

485-
def get_prefixed_libs(prefix: str) -> List[str]:
485+
def get_isolated_environment_lib_paths(prefix: str) -> List[str]:
486486
"""Return the lib locations under ``prefix``."""
487-
new_pure, new_plat = _sysconfig.get_prefixed_libs(prefix)
487+
new_pure, new_plat = _sysconfig.get_isolated_environment_lib_paths(prefix)
488488
if _USE_SYSCONFIG:
489489
return _deduplicated(new_pure, new_plat)
490490

491-
old_pure, old_plat = _distutils.get_prefixed_libs(prefix)
491+
old_pure, old_plat = _distutils.get_isolated_environment_lib_paths(prefix)
492492
old_lib_paths = _deduplicated(old_pure, old_plat)
493493

494494
# Apple's Python (shipped with Xcode and Command Line Tools) hard-code

0 commit comments

Comments
 (0)