Am 16.11.12 18:57, schrieb Andrew Collette:
> Hi Dana,
> 
>> Ah, I hadn't thought of that.  I'll mention that to the appropriate people.
>>
>> Does anyone know when the Python folks plan to upgrade to VS2010?  VS2008 is
>> four years old and is now the n-2 version.  That's getting a little long in
>> the tooth.
> 
> The newest version of Python (3.3) is built with VS2010.  I think they
> stuck with VS2008 for so long because of the extensions issue.

If would like to use a different VS version, you would need to compile
Python itself and all C extension with this version. So even if you would
get Python to compile with a different VS version, which is rather unlikely,
you still have a lot of trouble compiling *all* other C extension packages.
Since under Windows binary installs of C extension modules are very common,
this makes this option practically impossible if you don't want to spent an
unreasonable amount of time on it, not talking about the expertise you need
for this.

I tend to use MinGW32 (http://www.mingw.org/) to compile C extension for
Python on Windows. I know from experience it can compile and link against
VS2003 and VS2008 for different Python versions. I remember doing it at least
for 2.5, 2.6 and 2.7 using source code distributions of packages with pip or
setuptools/distribute. MinGW32 can figure out how to link against the right
library version.

PyTables has a make file for Windows that uses MinGW32 and supports several
Python versions as well 32 and 64 bit platforms:
https://github.com/PyTables/PyTables/blob/develop/mswindows/Makefile_windows

So one solution would be using MinGW32. In the ideal case you only make MinGW32
your default complier and than use the normal setup.py you used with VS.
Well, if there is a problem you need to solve it. ;)
There my be issues with lib and include paths and such. Which often can be
solved setting some environmental variables.

I use a file called pydistutils.cfg in my home directory which contains:

      [build]
      compiler=mingw32

This works for me. Alternatively, you can specify the compiler as an
command line argument:

setup.py build_ext --compiler mingw32

HTH,
Mike


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to