Author lemburg
Recipients eric.araujo, giampaolo.rodola, ipatrol, lemburg, loewis, mark.dickinson, r.david.murray, schmir, skrah, srid, tarek, thorsten.behrens, zzzeek
Date 2011-06-06.21:11:16
SpamBayes Score 2.498e-15
Marked as misclassified No
Message-id <1307394677.32.0.956164686805.issue7511@psf.upfronthosting.co.za>
In-reply-to
Content
Stefan Krah wrote:
> > 
> > Stefan Krah <stefan-usenet@bytereef.org> added the comment:
> > 
> > Marc-Andre Lemburg <report@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']"
History
Date User Action Args
2011-06-06 21:11:17lemburgsetrecipients: + lemburg, loewis, mark.dickinson, giampaolo.rodola, schmir, tarek, eric.araujo, r.david.murray, zzzeek, srid, skrah, ipatrol, thorsten.behrens
2011-06-06 21:11:17lemburgsetmessageid: <1307394677.32.0.956164686805.issue7511@psf.upfronthosting.co.za>
2011-06-06 21:11:16lemburglinkissue7511 messages
2011-06-06 21:11:16lemburgcreate