This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Add support for other MSVC compiler versions to distutils. distutils makes two incorrect assumption that MSVC compiler versions scale linearly and that the crt's are the same.
Type: enhancement Stage: resolved
Components: Distutils Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Ali Rizvi-Santiago, dstufft, eric.araujo, steve.dower
Priority: normal Keywords: patch

Created on 2018-11-05 23:33 by Ali Rizvi-Santiago, last changed 2022-04-11 14:59 by admin. This issue is now closed.

File name Uploaded Description Edit
distutils.patch Ali Rizvi-Santiago, 2018-11-05 23:33 Patch to Lib/distutils/{cygwinc,msvc9,msvc}
Messages (2)
msg329321 - (view) Author: Ali Rizvi-Santiago (Ali Rizvi-Santiago) * Date: 2018-11-05 23:33
Distutils makes a few incorrect assumptions that prevent it from supporting the newer Microsoft-y C compilers. This patch fixes it up till MSVC 14.0. There are 2 assumptions that are made by distutils and they are as follows.

The first one is that MSVC's versions scale linearly (subtracting 6). This assumption breaks when encountering major version 13.0 as VS2013 (12.0) uses 1800 and VS2015 (14.0) uses 1900 and so the calculation for version 13.0 does not actually exist. This was fixed in the patch for both and by skipping the major version 13.

The second assumption is in the get_msvcr() function in and is responsible for identifying the CRT name. The newer versions of MSVC aren't listed, so these were added in the patch. However, for version 1900 (MSVC 14.0) the crt is now named "vcruntime140" which was included. It might be better to to make this table-based if there is long-term interest in supporting these other compilers.

These are the only issues that I've ever encountered over the years with building CPython 2.7.x with the newer VS compilers.
msg386317 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:16
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79353
2021-02-03 18:16:28steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386317

resolution: out of date
stage: resolved
2018-11-05 23:33:08Ali Rizvi-Santiagocreate