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: broken error reporting about vcvarsall.bat
Type: behavior Stage: resolved
Components: Distutils, Windows Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: dstufft, eric.araujo, mgedmin, paul.moore, python-dev, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: 3.5regression

Created on 2015-10-05 07:19 by mgedmin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg252308 - (view) Author: Marius Gedminas (mgedmin) * Date: 2015-10-05 07:19
When you try to build a C extension on Windows without having a C compiler, distutils tries to raise DistutilsPlatformError("Unable to find vcvarsall.bat").  However, on Python 3.5, it doesn't do that -- instead it lets a WinError(2 "no such file or directory") from _find_vcvarsall escape.

This breaks packages such as zope.interface that ship optional C modules for faster execution, but would like to work on people's computers even when there is no C compiler.  See https://github.com/zopefoundation/zope.interface/issues/24 for details.
msg252349 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-05 17:29
Do you have a full stack trace for that exception? I don't see anywhere that should be able to raise WinError in _find_vcvarsall.
msg252350 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-05 17:30
Ah, found it in the linked thread. I'll fix for 3.5.1.
msg252351 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-10-05 17:35
New changeset a2016b29762c by Steve Dower in branch '3.5':
Issue #25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed.
https://hg.python.org/cpython/rev/a2016b29762c

New changeset 07161dd8a078 by Steve Dower in branch 'default':
Issue #25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed.
https://hg.python.org/cpython/rev/07161dd8a078
History
Date User Action Args
2022-04-11 14:58:22adminsetgithub: 69503
2015-10-05 17:35:59steve.dowersetstatus: open -> closed
resolution: fixed
stage: resolved
2015-10-05 17:35:48python-devsetnosy: + python-dev
messages: + msg252351
2015-10-05 17:30:46steve.dowersetkeywords: + 3.5regression
assignee: steve.dower

components: + Windows
nosy: + paul.moore, tim.golden, eric.araujo, zach.ware
2015-10-05 17:30:35steve.dowersetmessages: + msg252350
2015-10-05 17:29:52steve.dowersetmessages: + msg252349
2015-10-05 16:23:44eric.araujosetnosy: + steve.dower, - eric.araujo
2015-10-05 07:19:45mgedmincreate