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.

classification
Title: distutils._msvccompiler cannot find VS 2017
Type: behavior Stage: resolved
Components: Distutils, Windows Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords:

Created on 2017-05-17 17:54 by steve.dower, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1632 merged steve.dower, 2017-05-17 18:03
PR 3425 merged steve.dower, 2017-09-07 19:19
Messages (7)
msg293862 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-05-17 17:54
Visual Studio 2017 (including VC 14.1) cannot be discovered by the old registry key method. There is a new method that requires instantiating a COM class and querying for all installs, then selecting one.

My pyfindvs library (https://github.com/zooba/pyfindvs) can find a VS 2017 installation, and I propose porting the core C function into Python so that distutils._msvccompiler can use it.

This would be internal and not for public use (except via the normal build_ext API).
msg301612 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-09-07 18:49
New changeset 05f01d85257d0f3409c7335aaf0bf6a6da7eecb7 by Steve Dower in branch 'master':
bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)
https://github.com/python/cpython/commit/05f01d85257d0f3409c7335aaf0bf6a6da7eecb7
msg301632 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-09-07 21:31
New changeset 76006f285a7e146484d9296597d1d0ace778f992 by Steve Dower in branch '3.6':
[3.6] bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler GH-1632 (#3425)
https://github.com/python/cpython/commit/76006f285a7e146484d9296597d1d0ace778f992
msg301676 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-08 03:50
I'm pretty sure that the commit 05f01d85257d0f3409c7335aaf0bf6a6da7eecb7 introduced this memory leak:

test_distutils leaked [8736, 8740, 8740] references, sum=26216
test_distutils leaked [8640, 8642, 8642] memory blocks, sum=25924

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/99/steps/test/logs/stdio
msg301704 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-08 17:28
Python 3.6 is also impacted:
http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.6/builds/104
msg301881 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-09-11 15:53
I fixed the ref leak during the sprints but forgot to tag this issue in the PR.
msg301892 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-11 17:23
The fix:

commit af8d6b90723daa943c5cd0a38ee7564790d8687a
Author: Steve Dower <steve.dower@microsoft.com>
Date:   Fri Sep 8 11:35:38 2017 -0700

    Fixes reference leak (#3457)
History
Date User Action Args
2022-04-11 14:58:46adminsetgithub: 74574
2017-09-11 17:23:05vstinnersetmessages: + msg301892
2017-09-11 15:53:48steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg301881

stage: patch review -> resolved
2017-09-08 17:28:37vstinnersetmessages: + msg301704
2017-09-08 03:50:31vstinnersetnosy: + vstinner
messages: + msg301676
2017-09-07 21:31:11steve.dowersetmessages: + msg301632
2017-09-07 19:19:48steve.dowersetpull_requests: + pull_request3422
2017-09-07 18:49:25steve.dowersetmessages: + msg301612
2017-05-17 18:03:16steve.dowersetpull_requests: + pull_request1723
2017-05-17 17:54:52steve.dowercreate