Mercurial > cpython-lru_cache-weakref
annotate Lib/distutils/command/bdist.py @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | d296e6bb17e5 |
| children | 630293be1035 |
| 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 # created 2000/03/29, Greg Ward |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
7 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
8 __revision__ = "$Id$" |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
9 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
10 import os, string |
| 12168 | 11 from types import * |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
12 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
|
13 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
|
14 from distutils.util import get_platform |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
15 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
16 |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
17 def show_formats (): |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
18 """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
|
19 """ |
| 21268 | 20 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
|
21 formats=[] |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
22 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
|
23 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
|
24 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
|
25 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
|
26 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
|
27 |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
28 |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
29 class bdist (Command): |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
30 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
31 description = "create a built (binary) distribution" |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
32 |
|
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
|
33 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
|
34 "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
|
35 ('plat-name=', 'p', |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
36 "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
|
37 "(default: %s)" % get_platform()), |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
38 ('formats=', None, |
|
12997
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
39 "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
|
40 ('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
|
41 "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
|
42 "[default: dist]"), |
|
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 |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
45 help_options = [ |
|
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
46 ('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
|
47 "lists available distribution formats", show_formats), |
| 15216 | 48 ] |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
49 |
|
12691
7b466a73c961
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
Gregory P. Smith <greg@mad-scientist.com>
parents:
12603
diff
changeset
|
50 # The following commands do not take a format option from bdist |
|
7b466a73c961
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
Gregory P. Smith <greg@mad-scientist.com>
parents:
12603
diff
changeset
|
51 no_format_option = ('bdist_rpm',) |
|
7b466a73c961
Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically
Gregory P. Smith <greg@mad-scientist.com>
parents:
12603
diff
changeset
|
52 |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
53 # 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
|
54 # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
55 default_format = { 'posix': 'gztar', |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
56 'nt': 'zip', } |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
57 |
|
13810
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
58 # 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
|
59 format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', |
|
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
60 'wininst', 'zip'] |
|
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
61 |
|
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
62 # And the real information. |
|
12997
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
63 format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), |
|
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
64 'gztar': ('bdist_dumb', "gzip'ed tar file"), |
|
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
65 'bztar': ('bdist_dumb', "bzip2'ed tar file"), |
|
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
66 'ztar': ('bdist_dumb', "compressed tar file"), |
|
27f3a18fd296
Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.
Greg Ward <gward@python.net>
parents:
12869
diff
changeset
|
67 'tar': ('bdist_dumb', "tar file"), |
|
13030
5df034826735
Infrastructure support for the "bdist_wininst" command.
Greg Ward <gward@python.net>
parents:
12999
diff
changeset
|
68 'wininst': ('bdist_wininst', |
|
5df034826735
Infrastructure support for the "bdist_wininst" command.
Greg Ward <gward@python.net>
parents:
12999
diff
changeset
|
69 "Windows executable installer"), |
|
13810
76237c0cbf13
Added 'wininst' to the 'format_commands' list, so it's included in
Greg Ward <gward@python.net>
parents:
13348
diff
changeset
|
70 'zip': ('bdist_dumb', "ZIP file"), |
|
12999
7160b52ca74a
Changed so all the help-generating functions are defined, at module-level,
Greg Ward <gward@python.net>
parents:
12997
diff
changeset
|
71 } |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
72 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
73 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
74 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
|
75 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
|
76 self.plat_name = None |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
77 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
|
78 self.dist_dir = None |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
79 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
80 # initialize_options() |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
81 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
82 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
83 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
|
84 # 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
|
85 if self.plat_name is None: |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
86 self.plat_name = get_platform() |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13810
diff
changeset
|
87 |
|
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
|
88 # '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
|
89 # 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
|
90 # "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
|
91 if self.bdist_base is None: |
|
12783
b91b35c1d4c0
Some far-reaching naming changes:
Greg Ward <gward@python.net>
parents:
12703
diff
changeset
|
92 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
|
93 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
|
94 '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
|
95 |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
96 self.ensure_string_list('formats') |
|
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
97 if self.formats is None: |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
98 try: |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
99 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
|
100 except KeyError: |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
101 raise DistutilsPlatformError, \ |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
102 "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
|
103 "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
|
104 |
|
7628882dcccd
Added the --dist-dir option that the "bdist_*" will use to control where
Greg Ward <gward@python.net>
parents:
13030
diff
changeset
|
105 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
|
106 self.dist_dir = "dist" |
| 21268 | 107 |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
108 # finalize_options() |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
109 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
110 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
111 def run (self): |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
112 |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
113 # 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
|
114 commands = [] |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
115 for format in self.formats: |
|
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
116 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
|
117 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
|
118 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
|
119 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
|
120 |
|
14634
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
121 # 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
|
122 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
|
123 cmd_name = commands[i] |
|
12862
af0def063658
Support for multiple distribution formats in one run.
Greg Ward <gward@python.net>
parents:
12783
diff
changeset
|
124 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
|
125 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
|
126 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
|
127 |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
128 print ("bdist.run: format=%s, command=%s, rest=%s" % |
|
8bd5349e7aa8
Rene Liebscher: if we have to run the same sub-command multiple times
Greg Ward <gward@python.net>
parents:
14507
diff
changeset
|
129 (self.formats[i], cmd_name, 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
|
130 |
|
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 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
|
132 # 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
|
133 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
|
134 sub_cmd.keep_temp = 1 |
|
14948
7acb8bbc215b
Standardized whitespace around function calls.
Greg Ward <gward@python.net>
parents:
14634
diff
changeset
|
135 self.run_command(cmd_name) |
|
12155
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
136 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
137 # run() |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
138 |
|
fed89b57637a
The 'bdist' command, for creating "built" (binary) distributions.
Greg Ward <gward@python.net>
parents:
diff
changeset
|
139 # class bdist |
