diff options
author | Thomas Heller <theller@ctypes.org> | 2004-07-23 19:58:28 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2004-07-23 19:58:28 (GMT) |
commit | 612eb09aaed6326d061b70311f1622ba1434757c (patch) | |
tree | c9194b69bea09ddb6627e21404d6d87a5650b081 /Lib/distutils/command | |
parent | 6fa2474b204c2d5fa72f31300379c9def14d74b9 (diff) | |
download | cpython-612eb09aaed6326d061b70311f1622ba1434757c.zip cpython-612eb09aaed6326d061b70311f1622ba1434757c.tar.gz cpython-612eb09aaed6326d061b70311f1622ba1434757c.tar.bz2 |
Factored out a method to determine the final installer filename.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/bdist_wininst.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py index 506a4a2..20bd613 100644 --- a/Lib/distutils/command/bdist_wininst.py +++ b/Lib/distutils/command/bdist_wininst.py @@ -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 |