Mercurial > cpython-lru_cache-weakref
annotate Lib/distutils/command/bdist_dumb.py @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | 4ff92eb1a915 |
| children |
| rev | line source |
|---|---|
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
1 """distutils.command.bdist_dumb |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
2 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
3 Implements the Distutils 'bdist_dumb' command (create a "dumb" built |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
4 distribution -- i.e., just an archive to be unpacked under $prefix or |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
5 $exec_prefix).""" |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
6 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
7 __revision__ = "$Id$" |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
8 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
9 import os |
|
55036
4663163e6449
cleaned up the bdist_dumb module
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
10 |
|
58503
f9fd1795fcf7
added local get_platform/set_platform APIs in distutils.sysconfig
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
58450
diff
changeset
|
11 from sysconfig import get_python_version |
|
58450
fa69e891edf4
taking sysconfig out of distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
56335
diff
changeset
|
12 |
|
58503
f9fd1795fcf7
added local get_platform/set_platform APIs in distutils.sysconfig
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
58450
diff
changeset
|
13 from distutils.util import get_platform |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
14 from distutils.core import Command |
|
45468
1d84bf5f9478
Patch #2167 from calvin: Remove unused imports
Christian Heimes <christian@cheimes.de>
parents:
34805
diff
changeset
|
15 from distutils.dir_util import remove_tree, ensure_relative |
|
55036
4663163e6449
cleaned up the bdist_dumb module
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
16 from distutils.errors import DistutilsPlatformError |
|
23668
ca87119255eb
Make setup.py less chatty by default.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
22911
diff
changeset
|
17 from distutils import log |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
18 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
19 class bdist_dumb (Command): |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
20 |
|
55036
4663163e6449
cleaned up the bdist_dumb module
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
21 description = 'create a "dumb" built distribution' |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
22 |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
23 user_options = [('bdist-dir=', 'd', |
|
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
24 "temporary directory for creating the distribution"), |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
25 ('plat-name=', 'p', |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
26 "platform name to embed in generated filenames " |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
27 "(default: %s)" % get_platform()), |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
28 ('format=', 'f', |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
29 "archive format to create (tar, ztar, gztar, zip)"), |
|
14631
3cd2174ee10d
Renamed --keep-tree option to --keep-temp.
Greg Ward <gward@python.net>
parents:
14630
diff
changeset
|
30 ('keep-temp', 'k', |
|
12172
b7303f2ff613
Added code to blow away the pseudo-installation tree and a 'keep_tree'
Greg Ward <gward@python.net>
parents:
12156
diff
changeset
|
31 "keep the pseudo-installation tree around after " + |
|
b7303f2ff613
Added code to blow away the pseudo-installation tree and a 'keep_tree'
Greg Ward <gward@python.net>
parents:
12156
diff
changeset
|
32 "creating the distribution archive"), |
|
13349
b3530dae03bf
Added --dist-dir option to control where output archive(s) go.
Greg Ward <gward@python.net>
parents:
13041
diff
changeset
|
33 ('dist-dir=', 'd', |
|
b3530dae03bf
Added --dist-dir option to control where output archive(s) go.
Greg Ward <gward@python.net>
parents:
13041
diff
changeset
|
34 "directory to put final built distributions in"), |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
14948
diff
changeset
|
35 ('skip-build', None, |
|
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
14948
diff
changeset
|
36 "skip rebuilding everything (for testing/debugging)"), |
|
26424
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
37 ('relative', None, |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
38 "build the archive using relative paths" |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
39 "(default: false)"), |
|
56335
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
40 ('owner=', 'u', |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
41 "Owner name used when creating a tar file" |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
42 " [default: current user]"), |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
43 ('group=', 'g', |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
44 "Group name used when creating a tar file" |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
45 " [default: current group]"), |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
46 ] |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
47 |
|
26424
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
48 boolean_options = ['keep-temp', 'skip-build', 'relative'] |
|
14829
b1f220f636ed
Added 'boolean_options' list to support config file parsing.
Greg Ward <gward@python.net>
parents:
14631
diff
changeset
|
49 |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
50 default_format = { 'posix': 'gztar', |
|
21851
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
51 'nt': 'zip', |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
52 'os2': 'zip' } |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
53 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
54 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
55 def initialize_options (self): |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
56 self.bdist_dir = None |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
57 self.plat_name = None |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
58 self.format = None |
|
14631
3cd2174ee10d
Renamed --keep-tree option to --keep-temp.
Greg Ward <gward@python.net>
parents:
14630
diff
changeset
|
59 self.keep_temp = 0 |
|
13349
b3530dae03bf
Added --dist-dir option to control where output archive(s) go.
Greg Ward <gward@python.net>
parents:
13041
diff
changeset
|
60 self.dist_dir = None |
|
72136
4ff92eb1a915
Make bdist_* commands respect --skip-build passed to bdist (#10946)
Éric Araujo <merwok@netwok.org>
parents:
58503
diff
changeset
|
61 self.skip_build = None |
|
26424
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
62 self.relative = 0 |
|
56335
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
63 self.owner = None |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
64 self.group = None |
|
32736
c3a096bfbd6b
Whitespace normalization, via reindent.py.
Tim Peters <tim.peters@gmail.com>
parents:
26424
diff
changeset
|
65 |
|
55036
4663163e6449
cleaned up the bdist_dumb module
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
51047
diff
changeset
|
66 def finalize_options(self): |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
67 if self.bdist_dir is None: |
|
12783
b91b35c1d4c0
Some far-reaching naming changes:
Greg Ward <gward@python.net>
parents:
12729
diff
changeset
|
68 bdist_base = self.get_finalized_command('bdist').bdist_base |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
69 self.bdist_dir = os.path.join(bdist_base, 'dumb') |
|
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
70 |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
71 if self.format is None: |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
72 try: |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
73 self.format = self.default_format[os.name] |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
74 except KeyError: |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
75 raise DistutilsPlatformError, \ |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
76 ("don't know how to create dumb built distributions " + |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
77 "on platform %s") % os.name |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
78 |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
79 self.set_undefined_options('bdist', |
|
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
80 ('dist_dir', 'dist_dir'), |
|
72136
4ff92eb1a915
Make bdist_* commands respect --skip-build passed to bdist (#10946)
Éric Araujo <merwok@netwok.org>
parents:
58503
diff
changeset
|
81 ('plat_name', 'plat_name'), |
|
4ff92eb1a915
Make bdist_* commands respect --skip-build passed to bdist (#10946)
Éric Araujo <merwok@netwok.org>
parents:
58503
diff
changeset
|
82 ('skip_build', 'skip_build')) |
|
13349
b3530dae03bf
Added --dist-dir option to control where output archive(s) go.
Greg Ward <gward@python.net>
parents:
13041
diff
changeset
|
83 |
|
56335
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
84 def run(self): |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
14948
diff
changeset
|
85 if not self.skip_build: |
|
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
14948
diff
changeset
|
86 self.run_command('build') |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
87 |
|
14630
789c5b6c0f09
Ensure sub-commands of "install" are reinitialized too.
Greg Ward <gward@python.net>
parents:
14508
diff
changeset
|
88 install = self.reinitialize_command('install', reinit_subcommands=1) |
|
12701
90c7906b0999
Drastically simplified by taking advantage of the "install" command's
Gregory P. Smith <greg@mad-scientist.com>
parents:
12497
diff
changeset
|
89 install.root = self.bdist_dir |
|
21714
630293be1035
Patch #414775: Add --skip-build option to bdist command.
Martin v. Löwis <martin@v.loewis.de>
parents:
14948
diff
changeset
|
90 install.skip_build = self.skip_build |
|
22911
0773d23224d2
Set the warn_dir option to 0 before running the install command.
Thomas Heller <theller@ctypes.org>
parents:
21851
diff
changeset
|
91 install.warn_dir = 0 |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
92 |
|
23668
ca87119255eb
Make setup.py less chatty by default.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
22911
diff
changeset
|
93 log.info("installing to %s" % self.bdist_dir) |
|
14630
789c5b6c0f09
Ensure sub-commands of "install" are reinitialized too.
Greg Ward <gward@python.net>
parents:
14508
diff
changeset
|
94 self.run_command('install') |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
95 |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
96 # And make an archive relative to the root of the |
|
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
97 # pseudo-installation tree. |
|
12447
951d84e1d54b
Changed to call 'get_fullname()', not 'get_full_name()', on Distribution object.
Greg Ward <gward@python.net>
parents:
12172
diff
changeset
|
98 archive_basename = "%s.%s" % (self.distribution.get_fullname(), |
|
14507
c8727aca1404
Added --plat-name option to override sysconfig.get_platform() in
Greg Ward <gward@python.net>
parents:
13871
diff
changeset
|
99 self.plat_name) |
|
21851
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
100 |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
101 # OS/2 objects to any ":" characters in a filename (such as when |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
102 # a timestamp is used in a version) so change them to hyphens. |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
103 if os.name == "os2": |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
104 archive_basename = archive_basename.replace(":", "-") |
|
e0fc286d57a4
OS/2 patches by Andrew I MacIntyre for distutils.
Marc-André Lemburg <mal@egenix.com>
parents:
21714
diff
changeset
|
105 |
|
26424
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
106 pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
107 if not self.relative: |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
108 archive_root = self.bdist_dir |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
109 else: |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
110 if (self.distribution.has_ext_modules() and |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
111 (install.install_base != install.install_platbase)): |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
112 raise DistutilsPlatformError, \ |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
113 ("can't make a dumb built distribution where " |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
114 "base and platbase are different (%s, %s)" |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
115 % (repr(install.install_base), |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
116 repr(install.install_platbase))) |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
117 else: |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
118 archive_root = os.path.join(self.bdist_dir, |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
119 ensure_relative(install.install_base)) |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
120 |
|
51d005781c86
Fix for bug #410541: bdist builds bogus .zips
Andrew M. Kuchling <amk@amk.ca>
parents:
26285
diff
changeset
|
121 # Make the archive |
|
34793
3da21fdc2ee7
Add the upload command. Make all dist commands register their
Martin v. Löwis <martin@v.loewis.de>
parents:
33965
diff
changeset
|
122 filename = self.make_archive(pseudoinstall_root, |
|
56335
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
123 self.format, root_dir=archive_root, |
|
c2c90d1f3c33
#6516 added owner/group support for tarfiles in Distutils
Tarek Ziadé <ziade.tarek@gmail.com>
parents:
55036
diff
changeset
|
124 owner=self.owner, group=self.group) |
|
34805
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
125 if self.distribution.has_ext_modules(): |
|
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
126 pyversion = get_python_version() |
|
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
127 else: |
|
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
128 pyversion = 'any' |
|
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
129 self.distribution.dist_files.append(('bdist_dumb', pyversion, |
|
b8ff9bc023e6
Make dist_files a triple, with the Python target version included,
Martin v. Löwis <martin@v.loewis.de>
parents:
34793
diff
changeset
|
130 filename)) |
|
12156
db5c03fa8c73
The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
Greg Ward <gward@python.net>
parents:
diff
changeset
|
131 |
|
14631
3cd2174ee10d
Renamed --keep-tree option to --keep-temp.
Greg Ward <gward@python.net>
parents:
14630
diff
changeset
|
132 if not self.keep_temp: |
|
23668
ca87119255eb
Make setup.py less chatty by default.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
22911
diff
changeset
|
133 remove_tree(self.bdist_dir, dry_run=self.dry_run) |
