Skip to content

Commit 1a534b1

Browse files
committed
Add a detection for Red Hat's variable replacement
1 parent 7aaea4e commit 1a534b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pip/_internal/locations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def _looks_like_bpo_44860() -> bool:
6464

6565
def _looks_like_red_hat_patched_platlib_purelib(scheme: Dict[str, str]) -> bool:
6666
platlib = scheme["platlib"]
67+
if "/$platlibdir/" in platlib and hasattr(sys, "platlibdir"):
68+
platlib = platlib.replace("/$platlibdir/", f"/{sys.platlibdir}/")
6769
if "/lib64/" not in platlib:
6870
return False
6971
unpatched = platlib.replace("/lib64/", "/lib/")

0 commit comments

Comments
 (0)