mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
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).
This commit is contained in:
parent
379a02ffa9
commit
ab7983939b
1 changed files with 5 additions and 10 deletions
|
|
@ -75,16 +75,11 @@ class bdist_wininst (Command):
|
||||||
install = self.reinitialize_command('install')
|
install = self.reinitialize_command('install')
|
||||||
install.root = self.bdist_dir
|
install.root = self.bdist_dir
|
||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
# must force install to use the 'nt' scheme
|
# Must force install to use the 'nt' scheme; we set the
|
||||||
|
# prefix too just because it looks silly to put stuff
|
||||||
|
# in (eg.) ".../usr/Scripts", "usr/Include", etc.
|
||||||
|
install.prefix = "Python"
|
||||||
install.select_scheme('nt')
|
install.select_scheme('nt')
|
||||||
# change the backslash to the current pathname separator
|
|
||||||
for key in ('purelib', 'platlib', 'headers', 'scripts',
|
|
||||||
'data'):
|
|
||||||
attrname = 'install_' + key
|
|
||||||
attr = getattr (install, attrname)
|
|
||||||
if attr:
|
|
||||||
attr = string.replace (attr, '\\', os.sep)
|
|
||||||
setattr (install, attrname, attr)
|
|
||||||
|
|
||||||
install_lib = self.reinitialize_command('install_lib')
|
install_lib = self.reinitialize_command('install_lib')
|
||||||
# we do not want to include pyc or pyo files
|
# we do not want to include pyc or pyo files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue