Eric Swenson 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é wrote:
>
> Tarek Ziadé 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
> <http://bugs.python.org/issue5235>
> ___
>
Added file: http://bugs.python.org/file13060/unnamed
___
Python tracker
<http://bugs.python.org/issue5235>
___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é <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>
wrote:
Tarek Ziadé <mailto:ziade.ta...@gmail.com";>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 <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>
<http://bugs.python.org/issue5235";
target="_blank">http://bugs.python.org/issue5235>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com