Skip to content

Commit 9ac91f6

Browse files
committed
Fix condition for triggering warning on macOS bogus sysconfig
1 parent 95a58e7 commit 9ac91f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip/_internal/locations/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,9 @@ def _looks_like_apple_library(path: str) -> bool:
486486
def get_isolated_environment_lib_paths(prefix: str) -> List[str]:
487487
"""Return the lib locations under ``prefix``."""
488488
new_pure, new_plat = _sysconfig.get_isolated_environment_lib_paths(prefix)
489+
new_lib_paths = _deduplicated(new_pure, new_plat)
489490
if _USE_SYSCONFIG:
490-
return _deduplicated(new_pure, new_plat)
491+
return new_lib_paths
491492

492493
old_pure, old_plat = _distutils.get_isolated_environment_lib_paths(prefix)
493494
old_lib_paths = _deduplicated(old_pure, old_plat)
@@ -497,7 +498,7 @@ def get_isolated_environment_lib_paths(prefix: str) -> List[str]:
497498
# cause serious build isolation bugs when Apple starts shipping 3.10 because
498499
# pip will install build backends to the wrong location. This tells users
499500
# who is at fault so Apple may notice it and fix the issue in time.
500-
if all(_looks_like_apple_library(p) for p in old_lib_paths):
501+
if all(_looks_like_apple_library(p) for p in new_lib_paths):
501502
deprecated(
502503
reason=(
503504
"Python distributed by Apple's Command Line Tools incorrectly "

0 commit comments

Comments
 (0)