summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-09-11 00:47:35 (GMT)
committerGreg Ward <gward@python.net>2000-09-11 00:47:35 (GMT)
commit20283e5cc3845deb85dd406e037c628a15150e9a (patch)
tree336cd43b895f8d1e22b8c342537ba4f57d3668e2 /Lib/distutils/command/bdist.py
parent14deaaec122484df5a87ace237361b266531c7c0 (diff)
downloadcpython-20283e5cc3845deb85dd406e037c628a15150e9a.zip
cpython-20283e5cc3845deb85dd406e037c628a15150e9a.tar.gz
cpython-20283e5cc3845deb85dd406e037c628a15150e9a.tar.bz2
Added --plat-name option to override sysconfig.get_platform() in
generated filenames.
Diffstat (limited to 'Lib/distutils/command/bdist.py')
-rw-r--r--Lib/distutils/command/bdist.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py
index 1c862d5..cc0c398 100644
--- a/Lib/distutils/command/bdist.py
+++ b/Lib/distutils/command/bdist.py
@@ -32,6 +32,9 @@ class bdist (Command):
user_options = [('bdist-base=', 'b',
"temporary directory for creating built distributions"),
+ ('plat-name=', 'p',
+ "platform name to embed in generated filenames "
+ "(default: %s)" % get_platform()),
('formats=', None,
"formats for distribution (comma-separated list)"),
('dist-dir=', 'd',
@@ -70,6 +73,7 @@ class bdist (Command):
def initialize_options (self):
self.bdist_base = None
+ self.plat_name = None
self.formats = None
self.dist_dir = None
@@ -77,13 +81,16 @@ class bdist (Command):
def finalize_options (self):
+ # have to finalize 'plat_name' before 'bdist_base'
+ if self.plat_name is None:
+ self.plat_name = get_platform()
+
# 'bdist_base' -- parent of per-built-distribution-format
# temporary directories (eg. we'll probably have
# "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
if self.bdist_base is None:
build_base = self.get_finalized_command('build').build_base
- plat = get_platform()
- self.bdist_base = os.path.join (build_base, 'bdist.' + plat)
+ self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name)
self.ensure_string_list('formats')
if self.formats is None: