From ee78e84a6bb98b9abc53a581082eacedb9b74c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sun, 16 May 2021 23:28:04 +0800 Subject: [PATCH 1/6] Update msc_ver detection --- distutils/cygwinccompiler.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py index f1c38e39..9d1fb130 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': + # Visual Studio 2012 / Visual C++ 11.0 + return ['msvcr110'] + elif msc_ver == '1800': + # Visual Studio 2013 / Visual C++ 12.0 + return ['msvcr120'] + elif int(msc_ver) >= 1900 and int(msc_ver) < 2000: + # Visual Studio 2015 / Visual C++ 14.0 + return ['vcruntime140'] else: raise ValueError("Unknown MS Compiler version %s " % msc_ver) From ea88dcdaeaef9a6bfd8edc04a2e3df713222d185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Mon, 17 May 2021 22:11:56 +0800 Subject: [PATCH 2/6] Update cygwinccompiler.py --- distutils/cygwinccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py index 9d1fb130..4897352c 100644 --- a/distutils/cygwinccompiler.py +++ b/distutils/cygwinccompiler.py @@ -83,13 +83,13 @@ def get_msvcr(): # VS2010 / MSVC 10.0 return ['msvcr100'] elif msc_ver == '1700': - # Visual Studio 2012 / Visual C++ 11.0 + # VS2012 / MSVC 11.0 return ['msvcr110'] elif msc_ver == '1800': - # Visual Studio 2013 / Visual C++ 12.0 + # VS2013 / MSVC 12.0 return ['msvcr120'] elif int(msc_ver) >= 1900 and int(msc_ver) < 2000: - # Visual Studio 2015 / Visual C++ 14.0 + # VS2015 / MSVC 14.0 return ['vcruntime140'] else: raise ValueError("Unknown MS Compiler version %s " % msc_ver) From eca30e8e9ac046312b90e1541166433e3ed9084c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Tue, 18 May 2021 20:14:14 +0800 Subject: [PATCH 3/6] Update cygwinccompiler.py --- distutils/cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py index 4897352c..8288b8c8 100644 --- a/distutils/cygwinccompiler.py +++ b/distutils/cygwinccompiler.py @@ -90,7 +90,7 @@ def get_msvcr(): return ['msvcr120'] elif int(msc_ver) >= 1900 and int(msc_ver) < 2000: # VS2015 / MSVC 14.0 - return ['vcruntime140'] + return ['ucrt', 'vcruntime140'] else: raise ValueError("Unknown MS Compiler version %s " % msc_ver) From 2f343e783bd45407add738cc3a1395bf70207c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sun, 4 Jul 2021 21:05:02 +0800 Subject: [PATCH 4/6] Update distutils/cygwinccompiler.py Co-authored-by: Jason R. Coombs --- distutils/cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py index 8288b8c8..f80ca622 100644 --- a/distutils/cygwinccompiler.py +++ b/distutils/cygwinccompiler.py @@ -88,7 +88,7 @@ def get_msvcr(): elif msc_ver == '1800': # VS2013 / MSVC 12.0 return ['msvcr120'] - elif int(msc_ver) >= 1900 and int(msc_ver) < 2000: + elif 1900 <= int(msc_ver) < 2000: # VS2015 / MSVC 14.0 return ['ucrt', 'vcruntime140'] else: From 4fc012f2c1c67284a36d0ae4c93bb1431aad22cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Mon, 15 Nov 2021 16:45:12 +0800 Subject: [PATCH 5/6] Update test_cygwinccompiler.py --- distutils/tests/test_cygwinccompiler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distutils/tests/test_cygwinccompiler.py b/distutils/tests/test_cygwinccompiler.py index 9dc869de..77d06417 100644 --- a/distutils/tests/test_cygwinccompiler.py +++ b/distutils/tests/test_cygwinccompiler.py @@ -141,6 +141,9 @@ def test_get_msvcr(self): 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) ' From cdcb0fc8104646e96e20b62e4333d805cddeb704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Mon, 15 Nov 2021 16:52:14 +0800 Subject: [PATCH 6/6] Update test_cygwinccompiler.py --- distutils/tests/test_cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/tests/test_cygwinccompiler.py b/distutils/tests/test_cygwinccompiler.py index 77d06417..2a02eed4 100644 --- a/distutils/tests/test_cygwinccompiler.py +++ b/distutils/tests/test_cygwinccompiler.py @@ -147,7 +147,7 @@ def test_get_msvcr(self): # 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():