Skip to content

Commit 991d0f4

Browse files
committed
Use osx_framework_user for Mac framework build
1 parent 75ba96c commit 991d0f4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

news/9844.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``--user`` install scheme selection for macOS framework build.

src/pip/_internal/locations/_sysconfig.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ def _infer_prefix():
5454
def _infer_user():
5555
# type: () -> str
5656
"""Try to find a user scheme for the current platform."""
57-
suffixed = f"{os.name}_user"
57+
if sysconfig.get_config_var("PYTHONFRAMEWORK"): # Mac framework build.
58+
suffixed = "osx_framework_user"
59+
else:
60+
suffixed = f"{os.name}_user"
5861
if suffixed in _AVAILABLE_SCHEMES:
5962
return suffixed
6063
if "posix_user" not in _AVAILABLE_SCHEMES: # User scheme unavailable.

0 commit comments

Comments
 (0)