Skip to content

Commit

Permalink
Add a detection for Red Hat's variable replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Aug 28, 2021
1 parent 7aaea4e commit 1a534b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def _looks_like_bpo_44860() -> bool:

def _looks_like_red_hat_patched_platlib_purelib(scheme: Dict[str, str]) -> bool:
platlib = scheme["platlib"]
if "/$platlibdir/" in platlib and hasattr(sys, "platlibdir"):
platlib = platlib.replace("/$platlibdir/", f"/{sys.platlibdir}/")
if "/lib64/" not in platlib:
return False
unpatched = platlib.replace("/lib64/", "/lib/")
Expand Down

0 comments on commit 1a534b1

Please sign in to comment.