summaryrefslogtreecommitdiff
path: root/cygwinccompiler.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-08-03 12:41:42 +0000
committerMartin v. Löwis <martin@v.loewis.de>2004-08-03 12:41:42 +0000
commitab4c054599bc4bcce9deb27b543b6b5465667a66 (patch)
tree3f611b8ddf432b2a1507016f650db191d0e9c4e5 /cygwinccompiler.py
parentab63210e40d4c242c91f03b4ae363e2cdf7a6341 (diff)
downloadpython-setuptools-git-ab4c054599bc4bcce9deb27b543b6b5465667a66.tar.gz
Patch #870382: Automatically add msvcr71 to the list of libraries if
Python was built with VC 7.1.
Diffstat (limited to 'cygwinccompiler.py')
-rw-r--r--cygwinccompiler.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/cygwinccompiler.py b/cygwinccompiler.py
index a9620076..acd393d5 100644
--- a/cygwinccompiler.py
+++ b/cygwinccompiler.py
@@ -122,6 +122,17 @@ class CygwinCCompiler (UnixCCompiler):
"Consider upgrading to a newer version of gcc")
else:
self.dll_libraries=[]
+ # Include the appropriate MSVC runtime library if Python was built
+ # with MSVC 7.0 or 7.1.
+ msc_pos = sys.version.find('MSC v.')
+ if msc_pos != -1:
+ msc_ver = sys.version[msc_pos+6:msc_pos+10]
+ if msc_ver == '1300':
+ # MSVC 7.0
+ self.dll_libraries = ['msvcr70']
+ elif msc_ver == '1310':
+ # MSVC 7.1
+ self.dll_libraries = ['msvcr71']
# __init__ ()
@@ -308,6 +319,18 @@ class Mingw32CCompiler (CygwinCCompiler):
# no additional libraries needed
self.dll_libraries=[]
+ # Include the appropriate MSVC runtime library if Python was built
+ # with MSVC 7.0 or 7.1.
+ msc_pos = sys.version.find('MSC v.')
+ if msc_pos != -1:
+ msc_ver = sys.version[msc_pos+6:msc_pos+10]
+ if msc_ver == '1300':
+ # MSVC 7.0
+ self.dll_libraries = ['msvcr70']
+ elif msc_ver == '1310':
+ # MSVC 7.1
+ self.dll_libraries = ['msvcr71']
+
# __init__ ()
# class Mingw32CCompiler