diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-08-03 12:41:42 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-08-03 12:41:42 (GMT) |
commit | 7db57b3b419897d93ca2fa75a0cb0a03c25916fd (patch) | |
tree | 69ddf3f9588bcbd163223c10cacc8b032829d592 | |
parent | 61147f63d9eb20bdd34d5f7549f8379155aefd60 (diff) | |
download | cpython-7db57b3b419897d93ca2fa75a0cb0a03c25916fd.zip cpython-7db57b3b419897d93ca2fa75a0cb0a03c25916fd.tar.gz cpython-7db57b3b419897d93ca2fa75a0cb0a03c25916fd.tar.bz2 |
Patch #870382: Automatically add msvcr71 to the list of libraries if
Python was built with VC 7.1.
-rw-r--r-- | Lib/distutils/cygwinccompiler.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py index a962007..acd393d 100644 --- a/Lib/distutils/cygwinccompiler.py +++ b/Lib/distutils/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 |