diff options
| author | Mark Hammond <mhammond@skippinet.com.au> | 2008-04-07 01:53:39 (GMT) |
|---|---|---|
| committer | Mark Hammond <mhammond@skippinet.com.au> | 2008-04-07 01:53:39 (GMT) |
| commit | 495cf99aaf40fb1c0859e528d5b2c52018fba09f (patch) | |
| tree | 7eccc4215be221e4f5aae27a487e69d8057c2465 /Lib/distutils/command/bdist_msi.py | |
| parent | aa63d0d4af3db832b390ac74517af5eb799540e5 (diff) | |
| download | cpython-495cf99aaf40fb1c0859e528d5b2c52018fba09f.zip cpython-495cf99aaf40fb1c0859e528d5b2c52018fba09f.tar.gz cpython-495cf99aaf40fb1c0859e528d5b2c52018fba09f.tar.bz2 | |
Issue #2513: enable 64bit cross compilation on windows.
Diffstat (limited to 'Lib/distutils/command/bdist_msi.py')
| -rw-r--r-- | Lib/distutils/command/bdist_msi.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Lib/distutils/command/bdist_msi.py b/Lib/distutils/command/bdist_msi.py index a401452..f94d957 100644 --- a/Lib/distutils/command/bdist_msi.py +++ b/Lib/distutils/command/bdist_msi.py @@ -9,11 +9,11 @@ Implements the bdist_msi command. import sys, os from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError +from distutils.util import get_platform from distutils import log import msilib from msilib import schema, sequence, text @@ -87,6 +87,9 @@ class bdist_msi (Command): user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), @@ -116,6 +119,7 @@ class bdist_msi (Command): def initialize_options (self): self.bdist_dir = None + self.plat_name = None self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 @@ -139,7 +143,10 @@ class bdist_msi (Command): else: self.target_version = short_version - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ) if self.pre_install_script: raise DistutilsOptionError, "the pre-install-script feature is not yet implemented" @@ -181,7 +188,7 @@ class bdist_msi (Command): if not target_version: assert self.skip_build, "Should have already checked this" target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) + plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, 'lib' + plat_specifier) @@ -633,8 +640,7 @@ class bdist_msi (Command): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses - plat = get_platform() - installer_name = os.path.join(self.dist_dir, - "%s.%s-py%s.msi" % - (fullname, plat, self.target_version)) + base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, + self.target_version) + installer_name = os.path.join(self.dist_dir, base_name) return installer_name |
