diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 03:08:28 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 03:08:28 (GMT) |
commit | c59d4e07777ddb98013bc21256534bc4898be988 (patch) | |
tree | b23191365dc19dafc99d02ff7a3896082cb04f30 /Lib | |
parent | e30b7a91c742ded4921c01f7ad8bb053f2c3ab32 (diff) | |
download | cpython-c59d4e07777ddb98013bc21256534bc4898be988.zip cpython-c59d4e07777ddb98013bc21256534bc4898be988.tar.gz cpython-c59d4e07777ddb98013bc21256534bc4898be988.tar.bz2 |
Added the 'bdist_base' option, the base temp directory for all bdist commands.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/bdist.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py index 970779d..892712e 100644 --- a/Lib/distutils/command/bdist.py +++ b/Lib/distutils/command/bdist.py @@ -11,13 +11,16 @@ import os, string from types import * from distutils.core import Command from distutils.errors import * +from distutils.util import get_platform class bdist (Command): description = "create a built (binary) distribution" - user_options = [('format=', 'f', + user_options = [('bdist-base=', 'b', + "temporary directory for creating built distributions"), + ('format=', 'f', "format for distribution " + "(tar, ztar, gztar, bztar, zip, ... )"), ] @@ -39,12 +42,21 @@ class bdist (Command): def initialize_options (self): + self.bdist_base = None self.format = None # initialize_options() def finalize_options (self): + # '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.find_peer('build').build_base + plat = get_platform() + self.bdist_base = os.path.join (build_base, 'bdist.' + plat) + if self.format is None: try: self.format = self.default_format[os.name] @@ -55,7 +67,6 @@ class bdist (Command): #elif type (self.format) is StringType: # self.format = string.split (self.format, ',') - # finalize_options() |