Skip to content

Commit 02fcce2

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 a53f888 commit 02fcce2

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
@@ -137,8 +137,8 @@ def get_scheme(
137137
user
138138
and is_osx_framework()
139139
and k == "headers"
140-
and old_v.parent == new_v
141-
and old_v.name.startswith("python")
140+
and old_v.parent.parent == new_v.parent
141+
and old_v.parent.name.startswith("python")
142142
)
143143
if skip_osx_framework_user_special_case:
144144
continue

0 commit comments

Comments
 (0)