summaryrefslogtreecommitdiff
path: root/distutils2/command
diff options
context:
space:
mode:
Diffstat (limited to 'distutils2/command')
-rw-r--r--distutils2/command/bdist_msi.py2
-rw-r--r--distutils2/command/bdist_wininst.py2
-rw-r--r--distutils2/command/build.py6
-rw-r--r--distutils2/command/install_dist.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/distutils2/command/bdist_msi.py b/distutils2/command/bdist_msi.py
index 16bde24..f79bb41 100644
--- a/distutils2/command/bdist_msi.py
+++ b/distutils2/command/bdist_msi.py
@@ -203,7 +203,7 @@ class bdist_msi(Command):
target_version = self.target_version
if not target_version:
assert self.skip_build, "Should have already checked this"
- target_version = sys.version[0:3]
+ target_version = '%s.%s' % sys.version_info[:2]
plat_specifier = ".%s-%s" % (self.plat_name, target_version)
build = self.get_finalized_command('build')
build.build_lib = os.path.join(build.build_base,
diff --git a/distutils2/command/bdist_wininst.py b/distutils2/command/bdist_wininst.py
index 69e9484..ce06c1c 100644
--- a/distutils2/command/bdist_wininst.py
+++ b/distutils2/command/bdist_wininst.py
@@ -137,7 +137,7 @@ class bdist_wininst(Command):
target_version = self.target_version
if not target_version:
assert self.skip_build, "Should have already checked this"
- target_version = sys.version[0:3]
+ target_version = '%s.%s' % sys.version_info[:2]
plat_specifier = ".%s-%s" % (self.plat_name, target_version)
build = self.get_finalized_command('build')
build.build_lib = os.path.join(build.build_base,
diff --git a/distutils2/command/build.py b/distutils2/command/build.py
index 708b848..d4ace38 100644
--- a/distutils2/command/build.py
+++ b/distutils2/command/build.py
@@ -82,8 +82,8 @@ class build(Command):
raise PackagingOptionError(
"--plat-name only supported on Windows (try "
"using './configure --help' on your platform)")
-
- plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
+ pyversion = '%s.%s' % sys.version_info[:2]
+ plat_specifier = ".%s-%s" % (self.plat_name, pyversion)
# Make it so Python 2.x and Python 2.x with --with-pydebug don't
# share the same build directories. Doing so confuses the build
@@ -116,7 +116,7 @@ class build(Command):
'temp' + plat_specifier)
if self.build_scripts is None:
self.build_scripts = os.path.join(self.build_base,
- 'scripts-' + sys.version[0:3])
+ 'scripts-' + pyversion)
if self.executable is None:
self.executable = os.path.normpath(sys.executable)
diff --git a/distutils2/command/install_dist.py b/distutils2/command/install_dist.py
index bde77c3..e11a6d3 100644
--- a/distutils2/command/install_dist.py
+++ b/distutils2/command/install_dist.py
@@ -255,7 +255,7 @@ class install_dist(Command):
# $platbase in the other installation directories and not worry
# about needing recursive variable expansion (shudder).
- py_version = sys.version.split()[0]
+ py_version = '%s.%s' % sys.version_info[:2]
prefix, exec_prefix, srcdir, projectbase = get_config_vars(
'prefix', 'exec_prefix', 'srcdir', 'projectbase')