aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-03-18 15:00:25 +0200
committerMatti Picus <matti.picus@gmail.com>2020-03-18 15:00:25 +0200
commitfc2a0311e604d8411aba38e520ba2de05b71c8aa (patch)
tree9da9ffe5fb845feb95552fc8567b6f731571cb59 /lib-python
parentflip if, else (diff)
downloadpypy-fc2a0311e604d8411aba38e520ba2de05b71c8aa.tar.gz
pypy-fc2a0311e604d8411aba38e520ba2de05b71c8aa.tar.bz2
pypy-fc2a0311e604d8411aba38e520ba2de05b71c8aa.zip
try a fix for ensurepip failing on win32
Diffstat (limited to 'lib-python')
-rw-r--r--lib-python/2.7/distutils/command/install.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py
index 0dddbc56cb..8e0116abb1 100644
--- a/lib-python/2.7/distutils/command/install.py
+++ b/lib-python/2.7/distutils/command/install.py
@@ -501,6 +501,11 @@ class install (Command):
if os.name == 'posix' or os.name == 'nt':
val = os.path.expanduser(val)
val = subst_vars(val, self.config_vars)
+ # install_headers can end with a '/' if $dist_name is ''
+ # see issue 3140, and the comment in ./utils.py that CPython
+ # apparently never uses $dist_name
+ if val[-1] == '/':
+ val = val[:-1]
setattr(self, attr, val)