Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distutils: broken error reporting about vcvarsall.bat #69503

Closed
mgedmin mannequin opened this issue Oct 5, 2015 · 4 comments
Closed

distutils: broken error reporting about vcvarsall.bat #69503

mgedmin mannequin opened this issue Oct 5, 2015 · 4 comments
Assignees
Labels
OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@mgedmin
Copy link
Mannequin

mgedmin mannequin commented Oct 5, 2015

BPO 25316
Nosy @pfmoore, @mgedmin, @tjguk, @merwok, @zware, @zooba, @dstufft

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/zooba'
closed_at = <Date 2015-10-05.17:35:59.544>
created_at = <Date 2015-10-05.07:19:45.067>
labels = ['type-bug', 'library', 'OS-windows']
title = 'distutils: broken error reporting about vcvarsall.bat'
updated_at = <Date 2015-10-05.17:35:59.543>
user = 'https://github.com/mgedmin'

bugs.python.org fields:

activity = <Date 2015-10-05.17:35:59.543>
actor = 'steve.dower'
assignee = 'steve.dower'
closed = True
closed_date = <Date 2015-10-05.17:35:59.544>
closer = 'steve.dower'
components = ['Distutils', 'Windows']
creation = <Date 2015-10-05.07:19:45.067>
creator = 'mgedmin'
dependencies = []
files = []
hgrepos = []
issue_num = 25316
keywords = ['3.5regression']
message_count = 4.0
messages = ['252308', '252349', '252350', '252351']
nosy_count = 8.0
nosy_names = ['paul.moore', 'mgedmin', 'tim.golden', 'eric.araujo', 'python-dev', 'zach.ware', 'steve.dower', 'dstufft']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25316'
versions = ['Python 3.5']

@mgedmin
Copy link
Mannequin Author

mgedmin mannequin commented Oct 5, 2015

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 zopefoundation/zope.interface#24 for details.

@mgedmin mgedmin mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 5, 2015
@zooba
Copy link
Member

zooba commented Oct 5, 2015

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.

@zooba
Copy link
Member

zooba commented Oct 5, 2015

Ah, found it in the linked thread. I'll fix for 3.5.1.

@zooba zooba self-assigned this Oct 5, 2015
@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 5, 2015

New changeset a2016b29762c by Steve Dower in branch '3.5':
Issue bpo-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 bpo-25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed.
https://hg.python.org/cpython/rev/07161dd8a078

@zooba zooba closed this as completed Oct 5, 2015
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant