[Python-checkins] python/dist/src/Lib/distutils/command bdist_wininst.py, 1.54, 1.55

mhammond at users.sourceforge.net mhammond at users.sourceforge.net
Wed Oct 27 23:54:38 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27700

Modified Files:
	bdist_wininst.py 
Log Message:
Fix [1055540 ] bdist_wininst broken for pure Python distributions


Index: bdist_wininst.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_wininst.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- bdist_wininst.py	17 Aug 2004 10:15:07 -0000	1.54
+++ bdist_wininst.py	27 Oct 2004 21:54:33 -0000	1.55
@@ -116,20 +116,21 @@
         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.



More information about the Python-checkins mailing list