Skip to content

Commit

Permalink
Added some more Microsoft compilers to Lib/distutils and a fix to adj…
Browse files Browse the repository at this point in the history
…ust the majorVersion for VS2015.
  • Loading branch information
arizvisa committed Sep 1, 2019
1 parent 08e1488 commit bb43cf4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Lib/distutils/cygwinccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ def get_msvcr():
elif msc_ver == '1500':
# VS2008 / MSVC 9.0
return ['msvcr90']
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 msc_ver == '1900':
# VS2015 / MSVC 14.0
return ['vcruntime140']
else:
raise ValueError("Unknown MS Compiler version %s " % msc_ver)

Expand Down
4 changes: 4 additions & 0 deletions Lib/distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def get_build_version():
s, rest = sys.version[i:].split(" ", 1)
majorVersion = int(s[:-2]) - 6
minorVersion = int(s[2:3]) / 10.0

# There is no majorVersion of 13 (VS2013 == 1800, and VS2015 == 1900)
if majorVersion == 13: majorVersion = 14

# I don't think paths are affected by minor version in version 6
if majorVersion == 6:
minorVersion = 0
Expand Down
4 changes: 4 additions & 0 deletions Lib/distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ def get_build_version():
s, rest = sys.version[i:].split(" ", 1)
majorVersion = int(s[:-2]) - 6
minorVersion = int(s[2:3]) / 10.0

# There is no majorVersion of 13 (VS2013 == 1800, and VS2015 == 1900)
if majorVersion == 13: majorVersion = 14

# I don't think paths are affected by minor version in version 6
if majorVersion == 6:
minorVersion = 0
Expand Down

0 comments on commit bb43cf4

Please sign in to comment.