| Store | Cart

Re: [Python-Dev] Status of C compilers for Python on Windows

From: Ray Donnelly <ming...@gmail.com>
Sun, 12 Oct 2014 15:31:58 +0100
On Sun, Oct 12, 2014 at 9:43 AM, Roumen Petrov
<bugt...@roumenpetrov.info> wrote:
> Victor Stinner wrote:>>>> Hi,>> [SKIP]>>>> === MinGW>>>> Some people tried to compile Python. See for example:>> https://bitbucket.org/puqing/python-mingw>>>> We even got some patches:>> http://bugs.python.org/issue3871 (rejected)>> [SNIP]>> As "all in one" patch it was rejected , but you could find splits:> 17605 - mingw-meta: build interpeter core> 18653 - mingw-meta: build core modules>> Lot of people post links to possible issues using GCC windows compiler. A> lot of them are not real issues for CPython.>>> In addition for those why would like to cross compile C-extensions for MS> Windows either from linux of cygwin then could use this set:> 18654 - modernize mingw&cygwin compiler classes>>> I could step in as maintainer for Cygwin and builds based on GCC using> mingw* APIs.>

+1 for Roumen maintaining GCC cross builds using mingw*.

As Rafael Villar Burke mentioned, the MSYS2 project has Native Windows
Python builds (for both 3.4.2 and 2.7.8). We use Roumen's split
patches (and then our own on top):
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3
and https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python2.

To install MSYS2, build then test 32bit and 64bit mingw-w64-python3 on
a fresh 64bit Windows installation:
Download http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-x86_64-20141003.exe/download
Run msys2-x86_64-20141003.exe and install to a (short) path without
spaces or non-ascii characters (C:\msys64 is good), keep "Run MSYS2
64bit now." ticked. The remaining commands are to be entered in the
MSYS2 mintty shell.
# Install the packages necessary to build mingw-w64-python*
#  using Pacman package manager (answer Y or press enter when prompted):
pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain
# Download the source recipes and patches
#  that are used to build all of MSYS2's mingw-w64 packages:
git clone https://github.com/Alexpux/MINGW-packages
cd MINGW-packages/mingw-w64-python3
# Build it:
# (s == sync (install) necessary {make,}dependencies
#  L == write log files)
# answer Y or press enter when prompted
# (remove --nocheck if you want to run the testsuite before packaging)
makepkg-mingw -sL --nocheck

# To install the newly built packages:
pacman -U mingw-w64-*.xz

# To run them, you should add /mingw64/bin or /mingw32/bin to your PATH
# (or launch a new shell via mingw32_shell.bat or mingw64_shell.bat)
# Of course, if you don't want to build it from source you can simply issue:
pacman -S mingw-w64-python3

.. all of the above applies equally to mingw-w64-python2.

If anyone would like to help us to get our work into shape and then
merged we would be extremely grateful. Unfortunately Python is one of
our most patched packages.

In response to Steve Dower's request for discussion:

Having an alternative, fully Open Source build system for Python on
Windows using a stable Win32 ABI which is compatible all the way back
to Windows XP SP3 and Windows XP 64 and can interoperate out of the
box with many other tools and libraries (numpy, GNU Fortran - yes we
have this, pyQt, pyGTK etc) is something many people would dearly
like. We don't wish to usurp Visual Studio as the recommended build
system for Windows, we simply want to enable an Open Source choice.
For philosophical and practical reasons there are many people who wish
to limit their exposure to proprietary, closed build tools such as
Visual Studio. That Windows has always been a much more difficult
platform for Open Source development is not something that the Open
Source community should accept and then work around, rather something
we should try to fix. For information on contributing to MSYS2 please
see https://sourceforge.net/p/msys2/wiki/Contributing%20to%20MSYS2/

Finally, this thread has contained many references to mingw, care
should be taken to be explicit about which of MinGW-w64 or mingw is
being referred to, since they are two different projects. MinGW-w64
supports 64bit and a lot of work is being done to support ARM.

Best regards,

Ray Donnelly.

>> Regards,> Roumen Petrov>> _______________________________________________> Python-Dev mailing list> Pyth...@python.org> https://mail.python.org/mailman/listinfo/python-dev> Unsubscribe:> https://mail.python.org/mailman/options/python-dev/mingw.android%40gmail.com
_______________________________________________
Python-Dev mailing list
Pyth...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com

Recent Messages in this Thread
Victor Stinner Oct 10, 2014 12:29 am
Nathaniel Smith Oct 10, 2014 12:53 am
Sturla Molden Oct 10, 2014 09:12 am
Paul Moore Oct 10, 2014 07:07 am
Sturla Molden Oct 10, 2014 09:18 am
Victor Stinner Oct 10, 2014 09:29 am
Larry Hastings Oct 10, 2014 09:26 am
Victor Stinner Oct 10, 2014 09:50 am
Sturla Molden Oct 10, 2014 11:24 am
Paul Moore Oct 10, 2014 12:05 pm
Julian Taylor Oct 10, 2014 04:49 pm
M.-A. Lemburg Oct 10, 2014 10:21 am
Sturla Molden Oct 10, 2014 11:20 am
Sturla Molden Oct 10, 2014 11:27 am
Tres Seaver Oct 10, 2014 02:36 pm
Matthieu Brucher Oct 10, 2014 02:45 pm
Paul Moore Oct 10, 2014 02:56 pm
Larry Hastings Oct 10, 2014 11:45 pm
Sturla Molden Oct 11, 2014 12:30 am
Antoine Pitrou Oct 11, 2014 01:41 pm
Sturla Molden Oct 11, 2014 01:59 pm
Antoine Pitrou Oct 11, 2014 02:08 pm
Sturla Molden Oct 11, 2014 02:21 pm
Steve Dower Oct 11, 2014 05:44 pm
Sturla Molden Oct 11, 2014 04:58 pm
Nick Coghlan Oct 12, 2014 01:04 am
Nathaniel Smith Oct 11, 2014 06:32 pm
Paul Moore Oct 11, 2014 09:12 pm
Sturla Molden Oct 11, 2014 02:15 pm
Steve Dower Oct 11, 2014 03:33 pm
Nathaniel Smith Oct 11, 2014 02:01 pm
Merlijn van Deen Oct 10, 2014 11:00 am
Sturla Molden Oct 10, 2014 11:29 am
Rafael Villar Burke Oct 10, 2014 11:49 am
Brian Curtin Oct 10, 2014 02:31 pm
Mark Lawrence Oct 10, 2014 04:28 pm
Paul Moore Oct 10, 2014 05:01 pm
Roumen Petrov Oct 12, 2014 09:21 am
Steve Dower Oct 10, 2014 10:59 pm
Donald Stufft Oct 10, 2014 11:39 pm
Sturla Molden Oct 11, 2014 12:23 am
Roumen Petrov Oct 12, 2014 08:43 am
Ray Donnelly Oct 12, 2014 02:31 pm
Messages in this thread