Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff54336

Browse files
author
Tarek Ziadé
committed
Merged revisions 73348 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r73348 | tarek.ziade | 2009-06-11 11:13:36 +0200 (Thu, 11 Jun 2009) | 1 line #6263 fixed syntax error in distutils.cygwinccompiler ........
1 parent a8b5a14 commit ff54336

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lib/distutils/cygwinccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def get_msvcr():
8181
# VS2008 / MSVC 9.0
8282
return ['msvcr90']
8383
else:
84-
raise ValueError("Unknown MS Compiler version %i " % msc_Ver)
84+
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
8585

8686

8787
class CygwinCCompiler (UnixCCompiler):

Lib/distutils/tests/test_cygwinccompiler.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from distutils import cygwinccompiler
99
from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h,
1010
CONFIG_H_OK, CONFIG_H_NOTOK,
11-
CONFIG_H_UNCERTAIN, get_versions)
11+
CONFIG_H_UNCERTAIN, get_versions,
12+
get_msvcr)
1213
from distutils.tests import support
1314

1415
class FakePopen(object):
@@ -113,6 +114,38 @@ def test_get_versions(self):
113114
res = get_versions()
114115
self.assertEquals(res[2], None)
115116

117+
def test_get_msvcr(self):
118+
119+
# none
120+
sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) '
121+
'\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]')
122+
self.assertEquals(get_msvcr(), None)
123+
124+
# MSVC 7.0
125+
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
126+
'[MSC v.1300 32 bits (Intel)]')
127+
self.assertEquals(get_msvcr(), ['msvcr70'])
128+
129+
# MSVC 7.1
130+
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
131+
'[MSC v.1310 32 bits (Intel)]')
132+
self.assertEquals(get_msvcr(), ['msvcr71'])
133+
134+
# VS2005 / MSVC 8.0
135+
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
136+
'[MSC v.1400 32 bits (Intel)]')
137+
self.assertEquals(get_msvcr(), ['msvcr80'])
138+
139+
# VS2008 / MSVC 9.0
140+
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
141+
'[MSC v.1500 32 bits (Intel)]')
142+
self.assertEquals(get_msvcr(), ['msvcr90'])
143+
144+
# unknown
145+
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
146+
'[MSC v.1999 32 bits (Intel)]')
147+
self.assertRaises(ValueError, get_msvcr)
148+
116149
def test_suite():
117150
return unittest.makeSuite(CygwinCCompilerTestCase)
118151

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,8 @@ Core and Builtins
772772
Library
773773
-------
774774

775+
- Issue #6263: Fixed syntax error in distutils.cygwincompiler.
776+
775777
- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$`
776778
in Makefiles. This prevents compile errors when using syntax like:
777779
`LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe.

0 commit comments

Comments
 (0)