mirror of https://github.com/python/cpython
Fix [1055540 ] bdist_wininst broken for pure Python distributions
This commit is contained in:
parent
17931de110
commit
79d9bfa28f
|
@ -116,20 +116,21 @@ class bdist_wininst (Command):
|
||||||
install_lib.compile = 0
|
install_lib.compile = 0
|
||||||
install_lib.optimize = 0
|
install_lib.optimize = 0
|
||||||
|
|
||||||
# If we are building an installer for a Python version other
|
if self.distribution.has_ext_modules():
|
||||||
# than the one we are currently running, then we need to ensure
|
# If we are building an installer for a Python version other
|
||||||
# our build_lib reflects the other Python version rather than ours.
|
# than the one we are currently running, then we need to ensure
|
||||||
# Note that for target_version!=sys.version, we must have skipped the
|
# our build_lib reflects the other Python version rather than ours.
|
||||||
# build step, so there is no issue with enforcing the build of this
|
# Note that for target_version!=sys.version, we must have skipped the
|
||||||
# version.
|
# build step, so there is no issue with enforcing the build of this
|
||||||
target_version = self.target_version
|
# version.
|
||||||
if not target_version:
|
target_version = self.target_version
|
||||||
assert self.skip_build, "Should have already checked this"
|
if not target_version:
|
||||||
target_version = sys.version[0:3]
|
assert self.skip_build, "Should have already checked this"
|
||||||
plat_specifier = ".%s-%s" % (get_platform(), target_version)
|
target_version = sys.version[0:3]
|
||||||
build = self.get_finalized_command('build')
|
plat_specifier = ".%s-%s" % (get_platform(), target_version)
|
||||||
build.build_lib = os.path.join(build.build_base,
|
build = self.get_finalized_command('build')
|
||||||
'lib' + plat_specifier)
|
build.build_lib = os.path.join(build.build_base,
|
||||||
|
'lib' + plat_specifier)
|
||||||
|
|
||||||
# Use a custom scheme for the zip-file, because we have to decide
|
# Use a custom scheme for the zip-file, because we have to decide
|
||||||
# at installation time which scheme to use.
|
# at installation time which scheme to use.
|
||||||
|
|
Loading…
Reference in New Issue