summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-11-17 20:25:25 -0500
committerGitHub <noreply@github.com>2021-11-17 20:25:25 -0500
commit855ef649c731c45f80449c44eebc936facf347b1 (patch)
tree2523fd013c15ef0b153e1d4894b4cc5be0f489c2
parentb733057518082897621c6749d7338c6c3987706e (diff)
parentcdcb0fc8104646e96e20b62e4333d805cddeb704 (diff)
downloadpython-setuptools-git-855ef649c731c45f80449c44eebc936facf347b1.tar.gz
Merge pull request #41 from imba-tjd/patch-1
Update msc_ver detection
-rw-r--r--distutils/cygwinccompiler.py9
-rw-r--r--distutils/tests/test_cygwinccompiler.py5
2 files changed, 13 insertions, 1 deletions
diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
index f1c38e39..f80ca622 100644
--- a/distutils/cygwinccompiler.py
+++ b/distutils/cygwinccompiler.py
@@ -82,6 +82,15 @@ def get_msvcr():
elif msc_ver == '1600':
# VS2010 / MSVC 10.0
return ['msvcr100']
+ elif msc_ver == '1700':
+ # VS2012 / MSVC 11.0
+ return ['msvcr110']
+ elif msc_ver == '1800':
+ # VS2013 / MSVC 12.0
+ return ['msvcr120']
+ elif 1900 <= int(msc_ver) < 2000:
+ # VS2015 / MSVC 14.0
+ return ['ucrt', 'vcruntime140']
else:
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
diff --git a/distutils/tests/test_cygwinccompiler.py b/distutils/tests/test_cygwinccompiler.py
index 9dc869de..2a02eed4 100644
--- a/distutils/tests/test_cygwinccompiler.py
+++ b/distutils/tests/test_cygwinccompiler.py
@@ -141,10 +141,13 @@ class CygwinCCompilerTestCase(support.TempdirManager,
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
'[MSC v.1500 32 bits (Intel)]')
self.assertEqual(get_msvcr(), ['msvcr90'])
+
+ sys.version = '3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 18:46:30) [MSC v.1929 32 bit (Intel)]'
+ self.assertEqual(get_msvcr(), ['ucrt', 'vcruntime140'])
# unknown
sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
- '[MSC v.1999 32 bits (Intel)]')
+ '[MSC v.2000 32 bits (Intel)]')
self.assertRaises(ValueError, get_msvcr)
def test_suite():