diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2002-11-14 01:44:35 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2002-11-14 01:44:35 (GMT) |
commit | 1cace1a30a31d353dbd4a1f4760036c42b4114b9 (patch) | |
tree | f28f7f712b1a2aded76286d6ec9f0c863fa8cb34 /Lib/distutils | |
parent | 0ff98b9346f77d6888c29e5c787c5b1b75023efc (diff) | |
download | cpython-1cace1a30a31d353dbd4a1f4760036c42b4114b9.zip cpython-1cace1a30a31d353dbd4a1f4760036c42b4114b9.tar.gz cpython-1cace1a30a31d353dbd4a1f4760036c42b4114b9.tar.bz2 |
[Bug #550364] Use sysconfig.get_python_version()
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/bdist_wininst.py | 2 | ||||
-rw-r--r-- | Lib/distutils/command/build_ext.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py index 97a0458..dcc390e 100644 --- a/Lib/distutils/command/bdist_wininst.py +++ b/Lib/distutils/command/bdist_wininst.py @@ -70,7 +70,7 @@ class bdist_wininst (Command): if not self.target_version: self.target_version = "" if self.distribution.has_ext_modules(): - short_version = sys.version[:3] + short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ "target version can only be" + short_version diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 4bfc20c..250e539 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -12,7 +12,7 @@ import sys, os, string, re from types import * from distutils.core import Command from distutils.errors import * -from distutils.sysconfig import customize_compiler +from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension from distutils import log @@ -184,7 +184,7 @@ class build_ext (Command): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + sys.version[:3], + "python" + get_python_version(), "config")) else: # building python standard extensions |