summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2012-05-13 16:19:23 (GMT)
committerBrian Curtin <brian@python.org>2012-05-13 16:19:23 (GMT)
commit401f9f3d32dcebf5ead8079d46a83fe7c7631581 (patch)
tree899600f4dad86565fd3585499e2332d2a3599d42 /Lib/packaging
parent708d88c33441b29760b9246d61844eb59c1d0f3a (diff)
downloadcpython-401f9f3d32dcebf5ead8079d46a83fe7c7631581.zip
cpython-401f9f3d32dcebf5ead8079d46a83fe7c7631581.tar.gz
cpython-401f9f3d32dcebf5ead8079d46a83fe7c7631581.tar.bz2
Fix #13210. Port the Windows build from VS2008 to VS2010.
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/command/build_ext.py2
-rw-r--r--Lib/packaging/compiler/msvc9compiler.py11
2 files changed, 7 insertions, 6 deletions
diff --git a/Lib/packaging/command/build_ext.py b/Lib/packaging/command/build_ext.py
index 4c85822..99cf8ce 100644
--- a/Lib/packaging/command/build_ext.py
+++ b/Lib/packaging/command/build_ext.py
@@ -191,7 +191,7 @@ class build_ext(Command):
# Append the source distribution include and library directories,
# this allows distutils on windows to work in the source tree
self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC'))
- if MSVC_VERSION == 9:
+ if MSVC_VERSION >= 9:
# Use the .lib files for the correct architecture
if self.plat_name == 'win32':
suffix = ''
diff --git a/Lib/packaging/compiler/msvc9compiler.py b/Lib/packaging/compiler/msvc9compiler.py
index 029aa77..82659fe 100644
--- a/Lib/packaging/compiler/msvc9compiler.py
+++ b/Lib/packaging/compiler/msvc9compiler.py
@@ -634,11 +634,12 @@ class MSVCCompiler(CCompiler) :
mfid = 2
self._remove_visual_c_ref(temp_manifest)
out_arg = '-outputresource:%s;%s' % (output_filename, mfid)
- try:
- self.spawn(['mt.exe', '-nologo', '-manifest',
- temp_manifest, out_arg])
- except PackagingExecError as msg:
- raise LinkError(msg)
+ if self.__version < 10:
+ try:
+ self.spawn(['mt.exe', '-nologo', '-manifest',
+ temp_manifest, out_arg])
+ except PackagingExecError as msg:
+ raise LinkError(msg)
else:
logger.debug("skipping %s (up-to-date)", output_filename)