summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-12-20 16:43:07 -0500
committerJason R. Coombs <jaraco@jaraco.com>2021-12-20 16:43:46 -0500
commitedf116b1cc4a72075b9af06748df3b177d55d4dc (patch)
treee795a6cea59a1bfcfb06931d82bde21cf2edde88 /setuptools/command
parentaca3fe993e2f0159ed17ec5b8573e479bfa99617 (diff)
downloadpython-setuptools-git-edf116b1cc4a72075b9af06748df3b177d55d4dc.tar.gz
Select 'posix_user' for the scheme unless falling back to stdlib, then use 'unix_user'. Fixes #2938.
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/easy_install.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index e8150057..fb34d10e 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -378,7 +378,7 @@ class easy_install(Command):
msg = "User base directory is not specified"
raise DistutilsPlatformError(msg)
self.install_base = self.install_platbase = self.install_userbase
- scheme_name = os.name.replace('posix', 'unix') + '_user'
+ scheme_name = f'{os.name}_user'
self.select_scheme(scheme_name)
def _expand_attrs(self, attrs):
@@ -722,7 +722,7 @@ class easy_install(Command):
install._select_scheme(self, name)
except AttributeError:
# stdlib distutils
- install.install.select_scheme(self, name)
+ install.install.select_scheme(self, name.replace('posix', 'unix'))
# FIXME: 'easy_install.process_distribution' is too complex (12)
def process_distribution( # noqa: C901