Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab79839

Browse files
committed
Tweak what happens when run on non-Windows platforms: set install prefix
as well as scheme, and don't convert all installation paths (that's now done by the "install" command for us).
1 parent 379a02f commit ab79839

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

Lib/distutils/command/bdist_wininst.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,11 @@ def run (self):
7575
install = self.reinitialize_command('install')
7676
install.root = self.bdist_dir
7777
if os.name != 'nt':
78-
# must force install to use the 'nt' scheme
79-
install.select_scheme ('nt')
80-
# change the backslash to the current pathname separator
81-
for key in ('purelib', 'platlib', 'headers', 'scripts',
82-
'data'):
83-
attrname = 'install_' + key
84-
attr = getattr (install, attrname)
85-
if attr:
86-
attr = string.replace (attr, '\\', os.sep)
87-
setattr (install, attrname, attr)
78+
# Must force install to use the 'nt' scheme; we set the
79+
# prefix too just because it looks silly to put stuff
80+
# in (eg.) ".../usr/Scripts", "usr/Include", etc.
81+
install.prefix = "Python"
82+
install.select_scheme('nt')
8883

8984
install_lib = self.reinitialize_command('install_lib')
9085
# we do not want to include pyc or pyo files

0 commit comments

Comments
 (0)