[Python-Dev] VS 2010 compiler

Carl Kleffner cmkleffner at gmail.com
Wed Sep 30 21:57:58 CEST 2015


Concerning the claims that mingw is difficult:

The mingwpy package is a sligthly modified mingw-w64 based gcc toolchain,
that is in development. It is designed for simple use and for much better
compatibility to the standard MSVC python builds. It should work out of the
box, as long as the <Python>\Scripts folder is in the PATH.

It is not 'officially' released and announced, due to the fact that some
features are missing, the documentation has to be written and the build
scripts for the toolchain are not (yet) published.

Install a prerelease of mingwpy with pip:

  pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy

or with conda: (thanks to omnia-md)

  conda install -c https://conda.anaconda.org/omnia mingwpy

and use it at usual with pip install or python setup.py

You may need to configure %USERPROFILE%\pydistutils.cfg to use mingwpy if
you have an MSVC compiler installed:

[config]
compiler=mingw32
[build]
compiler=mingw32
[build_ext]
compiler=mingw32

Or you install the latest portable winpython distribution
https://winpython.github.io that contains the toolchain as well and works
out of the box.

Future releases of mingwpy will be deployed on Pypi.

That has to be said: the main emphasis of the toolchain is building python
binary extension (C, C++, GFORTRAN) on windows, not building python itself.

Carl

2015-09-30 21:15 GMT+02:00 Paul Moore <p.f.moore at gmail.com>:

> On 30 September 2015 at 16:57, Chris Barker - NOAA Federal
> <chris.barker at noaa.gov> wrote:
> >> 1. Install "Windows SDK for Windows 7 and .NET Framework 4" (v7.1)
> >> 2. Work from an SDK command prompt (with the environment variables
> >> set, and the SDK on PATH).
> >> 3. Set DISTUTILS_USE_SDK=1
> >> 4. Done.
> >
> > This, unfortunately is non-trivial, and really a pain if you want to
> > automate builds.
>
> Please clarify. What is non-trivial? Installing the SDK? I know, but
> we said that's out of scope. Using an SDK command prompt? It is, sort
> of, particularly if (like me) you use powershell. But again, not our
> issue. I assume setting the environment variable isn't an issue - you
> can do it for the session rather than globally, so even restrictive
> permissions aren't a problem.
>
> I appreciate you mightn't be intending this as criticism of the
> instructions, but many people do criticise in exactly this sort of
> way. Unix developers, in particular, who have limited Windows
> knowledge, find this level of instruction really frustrating to deal
> with. That's not a complaint - I have *huge* appreciation for
> non-Windows users who bother to make builds for Windows users - but it
> is an acknowledgement that often the audience for this sort of
> instruction are stumped by Microsoft's less than intuitive install
> processes...
>
> For context, installing mingw is just as messy, complicated and error
> prone (I speak from experience :-)) so it's unfair to complain that
> the above is a non-trivial pain. I know of no install option that's
> *less* straightforward than this (except of course for "install any
> version of Visual Studio 2010, even the free ones" - if you have
> access to those, use them!)
>
> For automation, why not use Appveyor? See
> https://packaging.python.org/en/latest/appveyor/ Unless you meant
> setting up a local build machine. If you want a simple "install a
> Python build environment" process, you could look at
> https://github.com/pfmoore/pybuild - I haven't used it in a while (as
> it's of no relevance to me, because I have VS2010) but it does work. I
> never publicised or distributed it, because I got too much pushback in
> terms of "but it doesn't work right on my system" (typically because
> the system in question usually *wasn't* a clean build of Windows) that
> I didn't have time or energy to address. But if it works for you, go
> for it.
>
> I'll push an addition to packaging.python.org, probably tomorrow.
>
> Paul
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/cmkleffner%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150930/9c7f3bfd/attachment.html>


More information about the Python-Dev mailing list