Eric Swenson <e...@swenson.org> added the comment:

Hi Tarek,
I have been debugging this and found the following:
If you set the DISTUTILS_USE_SDK environment variable to any value (I used
DISTUTILS_USE_SDK=1) and the MSSdk environment variable to anything (I used
MSSdk=1), and you manually run the "vcvarsall.bat" file that a VC++ user
should find in his "c:/Program Files/Visual Studio 8/VC" directory, then
easy_install/setuptools/distutils works fine for building extensions.

It would appear that if you set those environment variables, and the
"cl.exe", and "link.exe", etc. commands can be found on the path (the
vcvarsall.bat file would have done this), then distutils.MSVCompiler
(msvc9compiler) is perfectly happy to build the extension.

That said, I think it would be nice to have a means of making this more
painless.  I'm more than happy to help out.  If you have things for me to
try/test, I'll be happy to do that.  Since the compiler class is located
automatically, and I don't know much about distutils, I don't, off the top
of my head, know how to elegantly provide options to the not-yet-determined
compiler class.  (I'm sure you could point me in the right direction...)

I have a vmware VM setup with windows xp, python 2.6, and VC++ 2008 to use
for testing, so please let me know how I can best be of assistance.

Thanks. -- Eric

On Thu, Feb 12, 2009 at 3:20 PM, Tarek Ziadé <rep...@bugs.python.org> wrote:

>
> Tarek Ziadé <ziade.ta...@gmail.com> added the comment:
>
> distutils will use the same compiler used to build Python.
>
> If you want to build with a previous version of MSVC, you need to
> compile Python with that particular version.
>
> That said, MSVCCompiler could probably take new options, to force the
> MSVC version and the arch.
>
> This is in theory. Are you willing to help me build that patch ?
>
> Some tests on your system would be appreciated.
>
> ----------
> priority:  -> normal
> type:  -> feature request
> versions: +Python 2.7, Python 3.1 -Python 2.6
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue5235>
> _______________________________________
>

Added file: http://bugs.python.org/file13060/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5235>
_______________________________________
Hi&nbsp;Tarek,<div><br></div><div>I have been debugging this and found the 
following:<div><br></div><div>If you set the DISTUTILS_USE_SDK environment 
variable to any value (I used DISTUTILS_USE_SDK=1) and the MSSdk environment 
variable to anything (I used MSSdk=1), and you manually run the 
&quot;vcvarsall.bat&quot; file that a VC++ user should find in his 
&quot;c:/Program Files/Visual Studio 8/VC&quot; directory, then 
easy_install/setuptools/distutils works fine for building extensions.</div>
<div><br></div><div>It would appear that if you set those environment 
variables, and the &quot;cl.exe&quot;, and &quot;link.exe&quot;, etc. commands 
can be found on the path (the vcvarsall.bat file would have done this), then 
distutils.MSVCompiler (msvc9compiler) is perfectly happy to build the 
extension.</div>
<div><br></div><div>That said, I think it would be nice to have a means of 
making this more painless. &nbsp;I&#39;m more than happy to help out. &nbsp;If 
you have things for me to try/test, I&#39;ll be happy to do that. &nbsp;Since 
the compiler class is located automatically, and I don&#39;t know much about 
distutils, I don&#39;t, off the top of my head, know how to elegantly provide 
options to the not-yet-determined compiler class. &nbsp;(I&#39;m sure you could 
point me in the right direction...)</div>
<div><br></div><div>I have a vmware VM setup with windows xp, python 2.6, and 
VC++ 2008 to use for testing, so please let me know how I can best be of 
assistance.</div><div><br></div><div>Thanks. -- Eric<br><br><div 
class="gmail_quote">
On Thu, Feb 12, 2009 at 3:20 PM, Tarek Ziadé <span dir="ltr">&lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;</span> 
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Tarek Ziadé &lt;<a 
href="mailto:ziade.ta...@gmail.com";>ziade.ta...@gmail.com</a>&gt; added the 
comment:<br>
<br>
distutils will use the same compiler used to build Python.<br>
<br>
If you want to build with a previous version of MSVC, you need to<br>
compile Python with that particular version.<br>
<br>
That said, MSVCCompiler could probably take new options, to force the<br>
MSVC version and the arch.<br>
<br>
This is in theory. Are you willing to help me build that patch ?<br>
<br>
Some tests on your system would be appreciated.<br>
<br>
----------<br>
priority: &nbsp;-&gt; normal<br>
type: &nbsp;-&gt; feature request<br>
versions: +Python 2.7, Python 3.1 -Python 2.6<br>
<div><div></div><div class="Wj3C7c"><br>
_______________________________________<br>
Python tracker &lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue5235"; 
target="_blank">http://bugs.python.org/issue5235</a>&gt;<br>
_______________________________________<br>
</div></div></blockquote></div><br></div></div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to