Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24762

Re: distutils that supports msvc10 and that can be backfitted into Python 2.6

From Mero <ormax3@mail.com>
Subject Re: distutils that supports msvc10 and that can be backfitted into Python 2.6
Date 2012-07-02 06:40 +0300
References <B8F5CDE7FC952A4580ABD28F488EF279070550D2@AG-DCC-MBX01.dsone.3ds.com>
Newsgroups comp.lang.python
Message-ID <mailman.1696.1341200709.4697.python-list@python.org> (permalink)

Show all headers | View raw


On 26/06/2012 23:24, KACVINSKY Tom wrote:
> I have need for a distutils that supports msvc10, and which can be
> back-fitted into Python 2.6.  Is there such a beast?

One trick I found was to define an environment variable *VS90COMNTOOLS*
that points to the actual VS2010 location:

    VS90COMNTOOLS=%VS100COMNTOOLS%

This is because distutils looks for VS2008 in the registry and falls
back to the env. var. above, hence we trick it to detect VS2010 and call
`vcvarsall.bat` when compiling extensions:

    python setup.py build --compiler=msvc

Just keep in mind that it is recommended that "extension modules be
compiled with the same compiler that was used to compile Python" which
is still VS2008 to this day..

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: distutils that supports msvc10 and that can be backfitted into Python 2.6 Mero <ormax3@mail.com> - 2012-07-02 06:40 +0300

csiph-web