classification
Title: Distutils should generate a better error message when the SDK is not installed
Type: behavior Stage:
Components: Distutils Versions: Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: cdavid, tarek
Priority: low Keywords:

Created on 2008-05-22 11:33 by cdavid, last changed 2009-04-07 04:44 by cdavid.

Messages (3)
msg67187 - (view) Author: Cournapeau David (cdavid) Date: 2008-05-22 11:32
I tried to build some extensions with python 2.6 (built from sources
with VS 2008 express), and got some errors in the function
query_vcvarsall. The offending lines are:

if len(result) != len(interesting):
    raise ValueError(str(list(result.keys())))

I got a value error here. After some investigation, I realized that it
was because I did not install the SDK. I think the error message could
be isgnificantly improved if installing the SDK was suggested in the
exception message.
msg85578 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-04-05 22:16
Does it mean you won't get the settings for "include", "lib", "libpath"
and "path" when you call vcvarsall.bat *only* of the SDK is not
installed, or can't we have other cases ?

If the latter is true, maybe a better formatted Error message where
we list founded values and the list of missing values.
msg85685 - (view) Author: Cournapeau David (cdavid) Date: 2009-04-07 04:44
Hi tarek,

I can't say for sure about the only part. My experience on windows is
that there are so many possible combinations that getting it right is
difficult.

But in any case, the raised exception is not helpful. I am a developer
and familiar with distutils, and I could not make any sense of the
message. If the cause cannot be determined, at least a message like
"Unexpected result while detecting MS toolchain (str(result) vs
str(interesting)" would be helpful I think.

Also, but I am not 100 % sure about this, I believe any exception raised
within distutils should be inherited from DistutilsError
History
Date User Action Args
2009-04-07 04:44:51cdavidsetmessages: + msg85685
2009-04-05 22:16:43tareksetpriority: low

messages: + msg85578
2009-02-06 09:14:44tareksetassignee: tarek
type: behavior
nosy: + tarek
versions: + Python 3.1, Python 2.7
2008-05-22 11:33:00cdavidcreate