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.

Author laranzu
Recipients dstufft, eric.araujo, jyrkih, laranzu, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-11-04.23:25:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509837953.9.0.213398074469.issue31932@psf.upfronthosting.co.za>
In-reply-to
Content
The registry key is not totally reliable for finding the compiler.

What I did: my system is Windows 8.1 64 bit with Python 2.7 64 bit installed. I'd been testing a setup.py on Linux, time to try on MSWin. So I downloaded VCForPython27.msi as recommended by the Python docs, ran it, tried python setup.py build_ext. Failed because could not find VCVARSALL.BAT. Standard MSWin troubleshooting first step: restart. Still no.

Search turned up a freshly installed dir under AppData. After searching through distutils code, stepping through it, and poking around with RegEdit it turned out that while my system has various registry keys for Visual Studio versions from 7.1 through 12.0, even keys for 9.0, but not the particular one that find_vcvarsall wants.

Why not? How can I know? I added two lines of code to msvc9compiler.py and my extension now compiled.

To me, only the file system can be a totally reliable guide as to whether a particular path exists. I agree that it's not practical to wildly guess, or to search everywhere. But this is for Python 2.7, where the configuration has been frozen for all time. There's only a couple of places these files could be.

The additional code I've proposed will make Python continue to work even if the registry is clobbered. It will also make Python continue to work if the user copies the files from another system instead of running the installer. I think this is worthwhile, so ask that you reopen this issue.
History
Date User Action Args
2017-11-04 23:25:53laranzusetrecipients: + laranzu, paul.moore, tim.golden, eric.araujo, zach.ware, steve.dower, dstufft, jyrkih
2017-11-04 23:25:53laranzusetmessageid: <1509837953.9.0.213398074469.issue31932@psf.upfronthosting.co.za>
2017-11-04 23:25:53laranzulinkissue31932 messages
2017-11-04 23:25:53laranzucreate