Skip to content

Commit 3d7b9c5

Browse files
committed
Correctly ignore osx_framework_user mismatches
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.
1 parent 5fc6d16 commit 3d7b9c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pip/_internal/locations/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def get_scheme(
185185
user
186186
and is_osx_framework()
187187
and k == "headers"
188-
and old_v.parent == new_v
189-
and old_v.name.startswith("python")
188+
and old_v.parent.parent == new_v.parent
189+
and old_v.parent.name.startswith("python")
190190
)
191191
if skip_osx_framework_user_special_case:
192192
continue

0 commit comments

Comments
 (0)