Skip to content

Commit

Permalink
Use osx_framework_user for Mac framework build
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Apr 25, 2021
1 parent 75ba96c commit 991d0f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/9844.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``--user`` install scheme selection for macOS framework build.
5 changes: 4 additions & 1 deletion src/pip/_internal/locations/_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ def _infer_prefix():
def _infer_user():
# type: () -> str
"""Try to find a user scheme for the current platform."""
suffixed = f"{os.name}_user"
if sysconfig.get_config_var("PYTHONFRAMEWORK"): # Mac framework build.
suffixed = "osx_framework_user"
else:
suffixed = f"{os.name}_user"
if suffixed in _AVAILABLE_SCHEMES:
return suffixed
if "posix_user" not in _AVAILABLE_SCHEMES: # User scheme unavailable.
Expand Down

0 comments on commit 991d0f4

Please sign in to comment.