Skip to content

Commit 1501272

Browse files
committed
Use osx_framework_user for Mac framework build
1 parent 3209ad0 commit 1501272

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

news/9844.bugfix.rst

Lines changed: 1 addition & 0 deletions
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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ def _infer_prefix() -> str:
5252

5353
def _infer_user() -> str:
5454
"""Try to find a user scheme for the current platform."""
55-
suffixed = f"{os.name}_user"
55+
if sysconfig.get_config_var("PYTHONFRAMEWORK"): # Mac framework build.
56+
suffixed = "osx_framework_user"
57+
else:
58+
suffixed = f"{os.name}_user"
5659
if suffixed in _AVAILABLE_SCHEMES:
5760
return suffixed
5861
if "posix_user" not in _AVAILABLE_SCHEMES: # User scheme unavailable.

0 commit comments

Comments
 (0)