Marc-Andre Lemburg <m...@egenix.com> added the comment: Stefan Krah wrote: > > > > Stefan Krah <stefan-use...@bytereef.org> added the comment: > > > > Marc-Andre Lemburg <rep...@bugs.python.org> wrote: >> >> Wouldn't it be better to have distutils tell the user about the >> >> possible options, instead of guessing and then possibly compiling >> >> extensions which later on don't import or import, but don't work >> >> as expected ? > > > > That would be an option, yes. > > > > >> >> Regarding the latest patch: This is not the right approach, since >> >> find_vcvarsall() is supposed to return the path to the vcvarsall.bat >> >> file and not an architecture specific setup file. It is later >> >> called with the arch identifier, which the arch specific setup files >> >> don't check or use. > > > > The patch does not change anything for Visual Studio Pro. In Visual Studio > > Express (+SDK) vcvarsall.bat is broken, so the architecture specific setup > > files have to be used (they also work with a superfluous parameter).
I guess what I wanted to say is that find_vcvarsall() should return None for VC Express and code using it should then revert to using a new find_vcvars() function, which takes the architecture as parameter and returns the path to the correct architecture setup file. Hacking the support into find_vcvarsall() is not the right approach. You have to add this support one level further up. >> >> Also note that vcvarsall.bat can take these options: >> >> >> >> x86 (default), x64, amd64, x86_amd64, ia64, x86_ia64 >> >> >> >> The x86_* options setup the cross compilers. > > > > I think the patch covers all architecture specific files that are > > present in the Visual Studio Express + SDK setup. Right, but it doesn't cover the ones available in VS Pro (see above), which it should for completeness. > > Visual Studio Pro is protected from all changes by checking for > > the presence of the file bin\amd64\vcvarsamd64.bat. This > > could probably be done more elegantly by using some obscure > > registry value. > > > > > > > > As Thorsten mentioned, another option would be to copy bin\vcvars64.bat > > to bin\amd64\vcvarsamd64.bat if the latter is not present. > > > > This is harmless, but it is perhaps not really the business of Python > > to mess with existing installs. Not a good idea :-) PS: Changing the title, since I keep getting the following error messages from the email interface: There were problems handling your subject line argument list: - not of form [arg=value,value,...;arg=value,value,...] Subject was: "Re: [issue7511] msvc9compiler.py: ValueError: [u'path']" ---------- title: msvc9compiler.py: ValueError: [u'path'] -> msvc9compiler.py: ValueError when trying to compile with VC Express _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7511> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com