]> granicus.if.org Git - python/commitdiff
bdist_wininst now works correctly when both --skip-build and --plat-name are specified.
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 28 May 2008 01:54:55 +0000 (01:54 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Wed, 28 May 2008 01:54:55 +0000 (01:54 +0000)
Lib/distutils/command/bdist_wininst.py

index 7c43e7459ec39f2b1ca8a9a9e7f1025c1d64ee18..f18e318cb91b6e3e91ca8bb1e71dcf9524340a52 100644 (file)
@@ -79,6 +79,12 @@ class bdist_wininst (Command):
 
     def finalize_options (self):
         if self.bdist_dir is None:
+            if self.skip_build and self.plat_name:
+                # If build is skipped and plat_name is overridden, bdist will
+                # not see the correct 'plat_name' - so set that up manually.
+                bdist = self.distribution.get_command_obj('bdist')
+                bdist.plat_name = self.plat_name
+                # next the command will be initialized using that name
             bdist_base = self.get_finalized_command('bdist').bdist_base
             self.bdist_dir = os.path.join(bdist_base, 'wininst')
         if not self.target_version: