]> granicus.if.org Git - python/commitdiff
Factored out a method to determine the final installer filename.
authorThomas Heller <theller@ctypes.org>
Fri, 23 Jul 2004 19:58:28 +0000 (19:58 +0000)
committerThomas Heller <theller@ctypes.org>
Fri, 23 Jul 2004 19:58:28 +0000 (19:58 +0000)
Lib/distutils/command/bdist_wininst.py

index 506a4a26bab878bf7bfcdca74f6c722859b23ce9..20bd61389a39f05a8e3644b51d6d3a64254af91d 100644 (file)
@@ -224,15 +224,7 @@ class bdist_wininst (Command):
 
         cfgdata = self.get_inidata()
 
-        if self.target_version:
-            # if we create an installer for a specific python version,
-            # it's better to include this in the name
-            installer_name = os.path.join(self.dist_dir,
-                                          "%s.win32-py%s.exe" %
-                                           (fullname, self.target_version))
-        else:
-            installer_name = os.path.join(self.dist_dir,
-                                          "%s.win32.exe" % fullname)
+        installer_name = self.get_installer_filename(fullname)
         self.announce("creating %s" % installer_name)
 
         if bitmap:
@@ -280,6 +272,19 @@ class bdist_wininst (Command):
 
     # create_exe()
 
+    def get_installer_filename(self, fullname):
+        # Factored out to allow overriding in subclasses
+        if self.target_version:
+            # if we create an installer for a specific python version,
+            # it's better to include this in the name
+            installer_name = os.path.join(self.dist_dir,
+                                          "%s.win32-py%s.exe" %
+                                           (fullname, self.target_version))
+        else:
+            installer_name = os.path.join(self.dist_dir,
+                                          "%s.win32.exe" % fullname)
+    # get_installer_filename()
+
     def get_exe_bytes (self):
         from distutils.msvccompiler import get_build_version
         # If a target-version other than the current version has been