summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hammond <mhammond@skippinet.com.au>2004-10-27 21:54:33 (GMT)
committerMark Hammond <mhammond@skippinet.com.au>2004-10-27 21:54:33 (GMT)
commit79d9bfa28f66e031dbc252eabe78cd0aea081f06 (patch)
tree72afd1f2b74dcfeb71d6aeae7373eb3b6ee1a8f0
parent17931de110ac84e6b0eb88d77a95798f8670765a (diff)
downloadcpython-79d9bfa28f66e031dbc252eabe78cd0aea081f06.zip
cpython-79d9bfa28f66e031dbc252eabe78cd0aea081f06.tar.gz
cpython-79d9bfa28f66e031dbc252eabe78cd0aea081f06.tar.bz2
Fix [1055540 ] bdist_wininst broken for pure Python distributions
-rw-r--r--Lib/distutils/command/bdist_wininst.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index 33e1556..f4bab62 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -116,20 +116,21 @@ class bdist_wininst (Command):
install_lib.compile = 0
install_lib.optimize = 0
- # If we are building an installer for a Python version other
- # than the one we are currently running, then we need to ensure
- # our build_lib reflects the other Python version rather than ours.
- # Note that for target_version!=sys.version, we must have skipped the
- # build step, so there is no issue with enforcing the build of this
- # version.
- target_version = self.target_version
- if not target_version:
- assert self.skip_build, "Should have already checked this"
- target_version = sys.version[0:3]
- plat_specifier = ".%s-%s" % (get_platform(), target_version)
- build = self.get_finalized_command('build')
- build.build_lib = os.path.join(build.build_base,
- 'lib' + plat_specifier)
+ if self.distribution.has_ext_modules():
+ # If we are building an installer for a Python version other
+ # than the one we are currently running, then we need to ensure
+ # our build_lib reflects the other Python version rather than ours.
+ # Note that for target_version!=sys.version, we must have skipped the
+ # build step, so there is no issue with enforcing the build of this
+ # version.
+ target_version = self.target_version
+ if not target_version:
+ assert self.skip_build, "Should have already checked this"
+ target_version = sys.version[0:3]
+ plat_specifier = ".%s-%s" % (get_platform(), target_version)
+ build = self.get_finalized_command('build')
+ 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
# at installation time which scheme to use.