diff options
| author | ?ric Araujo <merwok@netwok.org> | 2011-09-19 03:58:52 +0200 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2011-09-19 03:58:52 +0200 |
| commit | c7846b75813d514321f67ddc08973d97a168d347 (patch) | |
| tree | 29ac8d40e9e545735e68a695254fe4e15557a293 /distutils2/command | |
| parent | 6b181d2a0fb465faf6402cdda337fbfeda93207e (diff) | |
| download | disutils2-c7846b75813d514321f67ddc08973d97a168d347.tar.gz | |
Make bdist_* commands respect --skip-build passed to bdist (#10946).
There was already a test for this, but it was complicated and had a
subtle bug (custom command objects need to be put in dist.command_obj so
that other command objects may see them) that rendered it moot.
Diffstat (limited to 'distutils2/command')
| -rw-r--r-- | distutils2/command/bdist_dumb.py | 5 | ||||
| -rw-r--r-- | distutils2/command/bdist_msi.py | 6 | ||||
| -rw-r--r-- | distutils2/command/bdist_wininst.py | 7 |
3 files changed, 14 insertions, 4 deletions
diff --git a/distutils2/command/bdist_dumb.py b/distutils2/command/bdist_dumb.py index b512c6a..677deb9 100644 --- a/distutils2/command/bdist_dumb.py +++ b/distutils2/command/bdist_dumb.py @@ -55,7 +55,7 @@ class bdist_dumb(Command): self.format = None self.keep_temp = False self.dist_dir = None - self.skip_build = False + self.skip_build = None self.relative = False self.owner = None self.group = None @@ -73,7 +73,8 @@ class bdist_dumb(Command): "don't know how to create dumb built distributions " "on platform %s" % os.name) - self.set_undefined_options('bdist', 'dist_dir', 'plat_name') + self.set_undefined_options('bdist', + 'dist_dir', 'plat_name', 'skip_build') def run(self): if not self.skip_build: diff --git a/distutils2/command/bdist_msi.py b/distutils2/command/bdist_msi.py index ad96911..1d967bd 100644 --- a/distutils2/command/bdist_msi.py +++ b/distutils2/command/bdist_msi.py @@ -139,18 +139,22 @@ class bdist_msi(Command): self.no_target_optimize = False self.target_version = None self.dist_dir = None - self.skip_build = False + 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') + 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/distutils2/command/bdist_wininst.py b/distutils2/command/bdist_wininst.py index 81a8391..9e0f5fb 100644 --- a/distutils2/command/bdist_wininst.py +++ b/distutils2/command/bdist_wininst.py @@ -6,6 +6,7 @@ import sys import os from shutil import rmtree + from distutils2.command.cmd import Command from distutils2.errors import PackagingOptionError, PackagingPlatformError from distutils2 import logger @@ -67,13 +68,15 @@ class bdist_wininst(Command): self.dist_dir = None self.bitmap = None self.title = None - self.skip_build = False + 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') + 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 @@ -83,8 +86,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: |
