Skip to content

Commit

Permalink
Allow equivalent distutils and sysconfig locations
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Apr 24, 2021
1 parent c157449 commit c4649ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/9839.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix compatibility between distutils and sysconfig when the returned location is a symbolic link.
4 changes: 4 additions & 0 deletions src/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import contextlib
import logging
import pathlib
import sys
Expand Down Expand Up @@ -45,6 +46,9 @@ def _default_base(*, user: bool) -> str:
def _warn_if_mismatch(old: pathlib.Path, new: pathlib.Path, *, key: str) -> bool:
if old == new:
return False
with contextlib.suppress(OSError):
if old.samefile(new):
return False
issue_url = "https://github.com/pypa/pip/issues/9617"
message = (
"Value for %s does not match. Please report this to <%s>"
Expand Down

0 comments on commit c4649ae

Please sign in to comment.