[Python-Dev] Python should be easily compilable on Windows with MinGW

Steve Dower steve.dower at python.org
Fri Feb 26 13:13:21 EST 2016


Hi Mathieu

I just want to say that we are very aware of the concerns and issues 
faced here and people (including myself) are actively working to resolve 
them.

For example, I am working with the Visual C++ team to encourage and 
support work such as 
https://blogs.msdn.microsoft.com/vcblog/2016/02/16/try-out-the-latest-c-compiler-toolset-without-waiting-for-the-next-update-of-visual-studio/, 
which strips out most of that 9GB install. It currently is not 
sufficient for building Python or extension modules, and is likely to be 
500MB+ by the time it is, but I am directly in contact with the team 
involved to achieve that. Once this is available, I will be looking into 
ways to make it easier to install the compiler. (I work at Microsoft, so 
I have a better ability than most to influence this sort of thing.)

In parallel, there is plenty going on over on distutils-sig to improve 
the package ecosystem in this respect (which I know is not your 
immediate concern, but it always comes up as soon as someone mentions a 
compiler). Improved sdist and wheel capabilities are critical to being 
able to help non-Windows developers produce pre-compiled software for 
their users.

Supporting a second compiler for CPython is a fairly significant task. 
We are willing to do it when someone volunteers to actively maintain it 
and manage a buildbot for it, but so far the best offer has been patches 
(not all of which are ready to be committed, though I haven't gone 
through them recently so that may have been improved).

Releasing builds from a second compiler is a big compatibility concern, 
as it is highly likely (right now) that existing wheels will simply 
crash when used. Dealing with that - probably by treating wheels as 
incompatible - is essential before we want other distros thinking they 
can release a MinGW build.

There's also plenty of distutils work required to support it properly, 
and I'm not sure how much of that should/could be done anyway.

So basically, smaller packages for MSVC are on their way, and MinGW 
support is blocked until someone commits to supporting it for an 
extended period of time. Hopefully that helps clarify our position.

Cheers,
Steve

On 26Feb2016 0212, Mathieu Dupuy wrote:
> Hi.
> I am currently working on adding some functionality on a standard
> library module (http://bugs.python.org/issue15873). The Python part
> went fine, but now I have to do the C counterpart, and I have ran into
> in several problems, which, stacked up, are a huge obstacle to easily
> contribute further. Currently, despite I could work, I can't go
> further
> on my patch.
>
> I am currently working in very limited network, CPU and time
> ressources* which are quite uncommon in the western world, but are
> much less in the rest of the world. I have a 2GB/month mobile data
> plan and a 100KB/s speed. For the C part of my patch, I should
> download Visual Studio. The Express Edition 2015 is roughly 9GB. I
> can't afford that.
>
> I downloaded Virtualbox and two Linux netinstall (Ubuntu 15.10 and
> Fedora 23). Shortly, I couldn't get something working quickly and
> simply (quickly = less than 2 hours, downloading time NOT included,
> which is anyway way too already much). What went wrong and why it went
> wrong could be a whole new thread and is outside of the scope of this
> message.
> Let me precise this : at my work I use many virtualbox instances
> automatically fired and run in parallel to test new deployments and
> run unittests. I like this tool,
> but despite its simple look, it (most of the time) can not be used
> simply by a profane. The concepts it requires you to understand are
> not intuitive at first sight and there is *always* a thing that go
> wrong (guest additions, mostly).(for example : Ubuntu and Virtualbox
> shipped for a moment a broken version of mount.vboxsf, preventing
> sharing folder to mount. Despite it's fixed, the broken releases
> spread everywhere and you may encounter them a lot in various Ubuntu
> and Virtualbox version. I downloaded the last versions of both and I
> am yet infected. https://www.virtualbox.org/ticket/12879). I could do
> whole new thread on why you can't ask newcomers to use Virtualbox
> (currently, at least).
>
> I ran into is a whole patch set to make CPython compile on MinGW
> (https://bugs.python.org/issue3871#msg199695). But it is not denying
> it's very experimental, and I know I would again spent useless hours
> trying to get it work rather than joyfully improving Python, and
> that's exactly what I do not want to happen.
>
> Getting ready to contribute to CPython pure python modules from an
> standard, average mr-everyone Windows PC for a beginner-to-medium
> contributor only require few megabytes of internet and few minutes of his
> time: getting a tarball of CPython sources (or cloning the github CPython
> mirror)**, a basic text editor and msys-git. The step further, if doing
> some -even basic- C code is required, implies downloading 9GB of Visual
> Studio and countless hours for it to be ready to use.
> I think downloading the whole Visual Studio suite is a huge stopper to
> contribute further for an average medium-or-below-contributor.
>
> I think (and I must not be the only one since CPython is to be moved
> to github), that barriers to contribute to CPython should be set to
> the lowest.
> Of course my situation is a bit special but I think it represents
> daily struggle of a *lot* of non-western programmer (at least for
> limited internet)(even here in Australia, landline limited internet
> connections are very common).
> It's not a big deal if the MinGW result build is twenty time slower or
> if some of the most advanced modules can't be build. But everyone
> programmer should be able to easily make some C hacks and get them to
> work.
>
> Hoping you'll be receptive to my pleas,
> Cheers
>
>
> * I am currently picking fruits in the regional Australia. I live in a van
> and have internet through with smartphone through an EDGE connection. I can
> plug the laptop in the farm but not in the van.
> ** No fresh programmer use mercurial unless he has a gun pointed on his
> head.



More information about the Python-Dev mailing list