Mercurial > cpython-lru_cache-weakref
annotate Lib/distutils/command/bdist.py @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | 4b881b4a90e9 |
| children | c2c90d1f3c33 |
| rev | line source |
|---|---|
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
1 """distutils.command.bdist |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
2 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
3 Implements the Distutils 'bdist' command (create a built [binary] |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
4 distribution).""" |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
5 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
6 __revision__ = "$Id$" |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
7 |
|
45468
1d84bf5f9478
Patch #2167 from calvin: Remove unused imports
Christian Heimes <christian@cheimes.de>
parents:
33965
diff
changeset
|
8 import os |
| 12168 | 9 from types import * |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
10 from distutils.core import Command |
|
12169
ff6c1a82c322
Rename 'formats' option to 'format', and remove the ability to generate
Greg Ward <gward@python.net>
parents:
12168
diff
changeset
|
11 from distutils.errors import * |
|
12703
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
12 from distutils.util import get_platform |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
13 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
14 |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
15 def show_formats(): |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
16 """Print list of available formats (arguments to "--format" option). |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
17 """ |
| 21268 | 18 from distutils.fancy_getopt import FancyGetopt |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
19 formats=[] |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
20 for format in bdist.format_commands: |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
21 formats.append(("formats=" + format, None, |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
22 bdist.format_command[format][1])) |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
23 pretty_printer = FancyGetopt(formats) |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
24 pretty_printer.print_help("List of available distribution formats:") |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
25 |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
26 |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
27 class bdist(Command): |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
28 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
29 description = "create a built (binary) distribution" |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
30 |
|
12703
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
31 user_options = [('bdist-base=', 'b', |
|
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
32 "temporary directory for creating built distributions"), |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
33 ('plat-name=', 'p', |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
34 "platform name to embed in generated filenames " |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
35 "(default: %s)" % get_platform()), |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
36 ('formats=', None, |
|
12997
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
37 "formats for distribution (comma-separated list)"), |
|
13348
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
38 ('dist-dir=', 'd', |
|
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
39 "directory to put final built distributions in " |
|
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
40 "[default: dist]"), |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
21268
diff
changeset
|
41 ('skip-build', None, |
|
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
21268
diff
changeset
|
42 "skip rebuilding everything (for testing/debugging)"), |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
43 ] |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
44 |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
21268
diff
changeset
|
45 boolean_options = ['skip-build'] |
|
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
21268
diff
changeset
|
46 |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
47 help_options = [ |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
48 ('help-formats', None, |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
49 "lists available distribution formats", show_formats), |
| 15216 | 50 ] |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
51 |
|
12691
7b466a73c961
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
Gregory P. Smith <greg@mad-scientist.com>
parents:
12603
diff
changeset
|
52 # The following commands do not take a format option from bdist |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
53 no_format_option = ('bdist_rpm',) |
|
12691
7b466a73c961
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
Gregory P. Smith <greg@mad-scientist.com>
parents:
12603
diff
changeset
|
54 |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
55 # This won't do in reality: will need to distinguish RPM-ish Linux, |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
56 # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
57 default_format = {'posix': 'gztar', |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
58 'nt': 'zip', |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
59 'os2': 'zip'} |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
60 |
|
13810
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
61 # Establish the preferred order (for the --help-formats option). |
|
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
62 format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
63 'wininst', 'zip', 'msi'] |
|
13810
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
64 |
|
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
65 # And the real information. |
|
52917
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
66 format_command = {'rpm': ('bdist_rpm', "RPM distribution"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
67 'gztar': ('bdist_dumb', "gzip'ed tar file"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
68 'bztar': ('bdist_dumb', "bzip2'ed tar file"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
69 'ztar': ('bdist_dumb', "compressed tar file"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
70 'tar': ('bdist_dumb', "tar file"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
71 'wininst': ('bdist_wininst', |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
72 "Windows executable installer"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
73 'zip': ('bdist_dumb', "ZIP file"), |
|
433de3d59607
Fixed #5095: msi missing from Distutils bdist formats
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
74 'msi': ('bdist_msi', "Microsoft Installer") |
|
23113
e7513e142c70
Patch #531901 by Mark W. Alexander: adds a new distutils packager
Marc-André Lemburg <mal@egenix.com>
parents:
22912
diff
changeset
|
75 } |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
76 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
77 |
|
52921
4b881b4a90e9
pep8-fied method names
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
52917
diff
changeset
|
78 def initialize_options(self): |
|
12703
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
79 self.bdist_base = None |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
80 self.plat_name = None |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
81 self.formats = None |
|
13348
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
82 self.dist_dir = None |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
21268
diff
changeset
|
83 self.skip_build = 0 |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
84 |
|
52921
4b881b4a90e9
pep8-fied method names
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
52917
diff
changeset
|
85 def finalize_options(self): |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
86 # have to finalize 'plat_name' before 'bdist_base' |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
87 if self.plat_name is None: |
|
46331
a93d2919ea59
Issue #2513: enable 64bit cross compilation on windows.
Mark Hammond <mhammond@skippinet.com.au>
parents:
45468
diff
changeset
|
88 if self.skip_build: |
|
a93d2919ea59
Issue #2513: enable 64bit cross compilation on windows.
Mark Hammond <mhammond@skippinet.com.au>
parents:
45468
diff
changeset
|
89 self.plat_name = get_platform() |
|
a93d2919ea59
Issue #2513: enable 64bit cross compilation on windows.
Mark Hammond <mhammond@skippinet.com.au>
parents:
45468
diff
changeset
|
90 else: |
|
a93d2919ea59
Issue #2513: enable 64bit cross compilation on windows.
Mark Hammond <mhammond@skippinet.com.au>
parents:
45468
diff
changeset
|
91 self.plat_name = self.get_finalized_command('build').plat_name |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
92 |
|
12703
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
93 # 'bdist_base' -- parent of per-built-distribution-format |
|
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
94 # temporary directories (eg. we'll probably have |
|
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
95 # "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.) |
|
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
96 if self.bdist_base is None: |
|
12783
b91b35c1d4c0
Some far-reaching naming changes:
Greg Ward <gward@python.net>
parents:
12703
diff
changeset
|
97 build_base = self.get_finalized_command('build').build_base |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
98 self.bdist_base = os.path.join(build_base, |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
99 'bdist.' + self.plat_name) |
|
12703
f555fd805085
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Gregory P. Smith <greg@mad-scientist.com>
parents:
12691
diff
changeset
|
100 |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
101 self.ensure_string_list('formats') |
|
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
102 if self.formats is None: |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
103 try: |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
104 self.formats = [self.default_format[os.name]] |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
105 except KeyError: |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
106 raise DistutilsPlatformError, \ |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
107 "don't know how to create built distributions " + \ |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
108 "on platform %s" % os.name |
|
13348
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
109 |
|
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
110 if self.dist_dir is None: |
|
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
111 self.dist_dir = "dist" |
| 21268 | 112 |
|
52921
4b881b4a90e9
pep8-fied method names
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
52917
diff
changeset
|
113 def run(self): |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
114 # Figure out which sub-commands we need to run. |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
115 commands = [] |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
116 for format in self.formats: |
|
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
117 try: |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
118 commands.append(self.format_command[format][0]) |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
119 except KeyError: |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
120 raise DistutilsOptionError, "invalid format '%s'" % format |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
121 |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
122 # Reinitialize and run each command. |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
123 for i in range(len(self.formats)): |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
124 cmd_name = commands[i] |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
125 sub_cmd = self.reinitialize_command(cmd_name) |
|
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
126 if cmd_name not in self.no_format_option: |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
127 sub_cmd.format = self.formats[i] |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
128 |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
129 # If we're going to need to run this command again, tell it to |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
130 # keep its temporary files around so subsequent runs go faster. |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
131 if cmd_name in commands[i+1:]: |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
132 sub_cmd.keep_temp = 1 |
|
14948
7acb8bbc215b
Standardized whitespace around function calls.
Greg Ward <gward@python.net>
parents:
14634
diff
changeset
|
133 self.run_command(cmd_name) |
