New submission from Ali Rizvi-Santiago <arizv...@gmail.com>:
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 msvc9compiler.py and msvccompiler.py by skipping the major version 13. The second assumption is in the get_msvcr() function in cygwinccompiler.py 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. ---------- components: Distutils files: distutils.patch keywords: patch messages: 329321 nosy: Ali Rizvi-Santiago, dstufft, eric.araujo priority: normal severity: normal status: open 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 versions: Python 2.7 Added file: https://bugs.python.org/file47908/distutils.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35172> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com