summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-04-05 22:51:09 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-04-05 22:51:09 (GMT)
commit64408fb4c5b58b3fa07a492436dfa5e119c189e0 (patch)
tree4bdfcaf204a7a151074b6010a6853cff6e53eb12 /Lib/distutils/command
parentd9e221d232b0ff39babb76e3dea395c5d6e2587b (diff)
downloadcpython-64408fb4c5b58b3fa07a492436dfa5e119c189e0.zip
cpython-64408fb4c5b58b3fa07a492436dfa5e119c189e0.tar.gz
cpython-64408fb4c5b58b3fa07a492436dfa5e119c189e0.tar.bz2
Fixed #5095: msi missing from Distutils bdist formats
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/bdist.py49
1 files changed, 16 insertions, 33 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py
index 3df5ef4..cb7598d 100644
--- a/Lib/distutils/command/bdist.py
+++ b/Lib/distutils/command/bdist.py
@@ -12,7 +12,7 @@ from distutils.errors import *
from distutils.util import get_platform
-def show_formats ():
+def show_formats():
"""Print list of available formats (arguments to "--format" option).
"""
from distutils.fancy_getopt import FancyGetopt
@@ -24,7 +24,7 @@ def show_formats ():
pretty_printer.print_help("List of available distribution formats:")
-class bdist (Command):
+class bdist(Command):
description = "create a built (binary) distribution"
@@ -50,35 +50,28 @@ class bdist (Command):
]
# The following commands do not take a format option from bdist
- no_format_option = ('bdist_rpm',
- #'bdist_sdux', 'bdist_pkgtool'
- )
+ no_format_option = ('bdist_rpm',)
# This won't do in reality: will need to distinguish RPM-ish Linux,
# Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
- default_format = { 'posix': 'gztar',
- 'nt': 'zip',
- 'os2': 'zip', }
+ default_format = {'posix': 'gztar',
+ 'nt': 'zip',
+ 'os2': 'zip'}
# Establish the preferred order (for the --help-formats option).
format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar',
- 'wininst', 'zip',
- #'pkgtool', 'sdux'
- ]
+ 'wininst', 'zip', 'msi']
# And the real information.
- format_command = { 'rpm': ('bdist_rpm', "RPM distribution"),
- 'zip': ('bdist_dumb', "ZIP file"),
- 'gztar': ('bdist_dumb', "gzip'ed tar file"),
- 'bztar': ('bdist_dumb', "bzip2'ed tar file"),
- 'ztar': ('bdist_dumb', "compressed tar file"),
- 'tar': ('bdist_dumb', "tar file"),
- 'wininst': ('bdist_wininst',
- "Windows executable installer"),
- 'zip': ('bdist_dumb', "ZIP file"),
- #'pkgtool': ('bdist_pkgtool',
- # "Solaris pkgtool distribution"),
- #'sdux': ('bdist_sdux', "HP-UX swinstall depot"),
+ format_command = {'rpm': ('bdist_rpm', "RPM distribution"),
+ 'gztar': ('bdist_dumb', "gzip'ed tar file"),
+ 'bztar': ('bdist_dumb', "bzip2'ed tar file"),
+ 'ztar': ('bdist_dumb', "compressed tar file"),
+ 'tar': ('bdist_dumb', "tar file"),
+ 'wininst': ('bdist_wininst',
+ "Windows executable installer"),
+ 'zip': ('bdist_dumb', "ZIP file"),
+ 'msi': ('bdist_msi', "Microsoft Installer")
}
@@ -89,9 +82,6 @@ class bdist (Command):
self.dist_dir = None
self.skip_build = 0
- # initialize_options()
-
-
def finalize_options (self):
# have to finalize 'plat_name' before 'bdist_base'
if self.plat_name is None:
@@ -120,10 +110,7 @@ class bdist (Command):
if self.dist_dir is None:
self.dist_dir = "dist"
- # finalize_options()
-
def run (self):
-
# Figure out which sub-commands we need to run.
commands = []
for format in self.formats:
@@ -144,7 +131,3 @@ class bdist (Command):
if cmd_name in commands[i+1:]:
sub_cmd.keep_temp = 1
self.run_command(cmd_name)
-
- # run()
-
-# class bdist