Skip to content

Commit

Permalink
Correctly ignore osx_framework_user mismatches
Browse files Browse the repository at this point in the history
The expected 'headers' path is generally:

* distutils (old): $PREFIX/include/python3.8/$PROJECT
* sysconfig (new): $PREFIX/include/$PROJECT

So we should check whether the old value's parent is a pythonX.Y, and
the new value's parent matches the old's second-level parent.
  • Loading branch information
uranusjr committed Jul 31, 2021
1 parent 5fc6d16 commit 3d7b9c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def get_scheme(
user
and is_osx_framework()
and k == "headers"
and old_v.parent == new_v
and old_v.name.startswith("python")
and old_v.parent.parent == new_v.parent
and old_v.parent.name.startswith("python")
)
if skip_osx_framework_user_special_case:
continue
Expand Down

0 comments on commit 3d7b9c5

Please sign in to comment.