summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-08-29 19:48:39 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-08-29 19:48:39 (GMT)
commitfbe37dfffe501973b1e998bca948748097857179 (patch)
treead3327d3fddd94cd042c8d69f47a0948bfab09d9 /Lib/distutils/command
parentaa26b275034c07784c4d64e9a2bc26c742577327 (diff)
downloadcpython-fbe37dfffe501973b1e998bca948748097857179.zip
cpython-fbe37dfffe501973b1e998bca948748097857179.tar.gz
cpython-fbe37dfffe501973b1e998bca948748097857179.tar.bz2
Make bdist_* commands respect --skip-build passed to bdist (#10946)
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/bdist_dumb.py5
-rw-r--r--Lib/distutils/command/bdist_msi.py6
-rw-r--r--Lib/distutils/command/bdist_wininst.py6
3 files changed, 13 insertions, 4 deletions
diff --git a/Lib/distutils/command/bdist_dumb.py b/Lib/distutils/command/bdist_dumb.py
index 170e889..1ab09d1 100644
--- a/Lib/distutils/command/bdist_dumb.py
+++ b/Lib/distutils/command/bdist_dumb.py
@@ -47,7 +47,7 @@ class bdist_dumb(Command):
self.format = None
self.keep_temp = 0
self.dist_dir = None
- self.skip_build = 0
+ self.skip_build = None
self.relative = 0
def finalize_options(self):
@@ -65,7 +65,8 @@ class bdist_dumb(Command):
self.set_undefined_options('bdist',
('dist_dir', 'dist_dir'),
- ('plat_name', 'plat_name'))
+ ('plat_name', 'plat_name'),
+ ('skip_build', 'skip_build'))
def run(self):
if not self.skip_build:
diff --git a/Lib/distutils/command/bdist_msi.py b/Lib/distutils/command/bdist_msi.py
index b11957a..b3cfe9c 100644
--- a/Lib/distutils/command/bdist_msi.py
+++ b/Lib/distutils/command/bdist_msi.py
@@ -130,18 +130,22 @@ class bdist_msi(Command):
self.no_target_optimize = 0
self.target_version = None
self.dist_dir = None
- self.skip_build = 0
+ self.skip_build = None
self.install_script = None
self.pre_install_script = None
self.versions = None
def finalize_options(self):
+ self.set_undefined_options('bdist', ('skip_build', 'skip_build'))
+
if self.bdist_dir is None:
bdist_base = self.get_finalized_command('bdist').bdist_base
self.bdist_dir = os.path.join(bdist_base, 'msi')
+
short_version = get_python_version()
if (not self.target_version) and self.distribution.has_ext_modules():
self.target_version = short_version
+
if self.target_version:
self.versions = [self.target_version]
if not self.skip_build and self.distribution.has_ext_modules()\
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index b7916e3..e3ed3ad 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -65,13 +65,15 @@ class bdist_wininst(Command):
self.dist_dir = None
self.bitmap = None
self.title = None
- self.skip_build = 0
+ self.skip_build = None
self.install_script = None
self.pre_install_script = None
self.user_access_control = None
def finalize_options(self):
+ self.set_undefined_options('bdist', ('skip_build', 'skip_build'))
+
if self.bdist_dir is None:
if self.skip_build and self.plat_name:
# If build is skipped and plat_name is overridden, bdist will
@@ -81,8 +83,10 @@ class bdist_wininst(Command):
# next the command will be initialized using that name
bdist_base = self.get_finalized_command('bdist').bdist_base
self.bdist_dir = os.path.join(bdist_base, 'wininst')
+
if not self.target_version:
self.target_version = ""
+
if not self.skip_build and self.distribution.has_ext_modules():
short_version = get_python_version()
if self.target_version and self.target_version != short_version: