[SciPy-Dev] win32 binaries and scipy 0.17.0 release

Carl Kleffner cmkleffner at gmail.com
Mon Jan 4 11:03:20 EST 2016


Python binary extensions build with mingw-w64 and MSVC based CPython
combatibility in mind should be compiled with a toolchain that has to be
build with specific configurations and patches.

The most important demands are exclusive linking the appropriate MS CRT
runtime and statically linking the gcc runtime objects. Some other
configurations are handling long double as double (as MS ABI does not
support extended precision), standrad exception and win32 thread handling.
Universal runtime support (VS 2015) is planned for the future.

I doubt that this demands can be easily handled with mingw-w64 cross
compilers found a certain Linux distros. Is the idea to build a specialized
cross compiler for that purpose?

Using the mingwpy package together with msys2 can be used instead if
autotools have to be used. As mingwpy is not a cross compiler a windows box
or a windows VM is needed. It was also shown that mingwpy works within
Linux using Wine to compile python extensions.

carlkl

2016-01-04 15:39 GMT+01:00 Matthew Brett <matthew.brett at gmail.com>:

> On Sun, Jan 3, 2016 at 12:31 AM, Tony Kelman <tony at kelman.net> wrote:
> > Matthew Brett <matthew.brett <at> gmail.com> writes:
> >
> >> No, you misunderstand me, it's possible to imagine this system built
> >> on any easily available Python, I was only saying that it's important
> >> that it should be obvious and easy how to build each individual
> >> project without having to worry about - for example - the DLL
> >> configuration of other projects.
> >
> > I see, sorry for the misunderstanding. This seems like a problem
> > that isn't really feasible to solve in the absolute most general
> > case. Maybe the ucrt will help eventually, that was some of its
> > design motivation, but it's still far too early to tell.
> >
> >> We could surely benefit from cross-compilation - is there a good
> >> central place to get going with mingw-w64 cross compiling?
> >
> > Not that I know of, I had to pick it up by trying it out and lots
> > of practice. I gave a very short talk at last year's JuliaCon that
> > touched on this, but there wasn't much time for details. I've been
> > meaning to record a screencast type tutorial that would be targeted
> > mainly towards Julia package developers to cover all of the details
> > starting from getting and using cross-compilers on a number of common
> > Linux distributions. May also work from OSX, but there isn't a great
> > standard source of OSX-to-MinGW cross compiler binaries right now.
> >
> > Debian, Ubuntu, Fedora, OpenSUSE, Arch, and Cygwin all have reasonably
> > up-to-date mingw-w64 cross-compiler packages readily available
> > in their repositories. If you pick a library that uses autotools,
> > it can be as simple as configuring with --host=x86_64-w64-mingw32.
> > CMake-built libraries also usually work but require a more verbose
> > set of flags. This covers getting you to a DLL, which is the hardest
> > part for Julia packages that wrap compiled C/Fortran libraries. I'm
> > not very familiar with the additional steps that would be needed to
> > build a Python C extension. You'd probably need an easy way of getting
> > a Windows copy of libpython and Python.h onto the build machine?
> >
> > I could work through an example of this, maybe pick a Linux
> > distribution to build from and a library to build and we could
> > put together a Docker container that would have all the steps to
> > produce a Windows DLL.
>
> That docker container would be extremely useful - what can I do to help?
>
> Cheers,
>
> Matthew
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160104/3f6dbe19/attachment.html>


More information about the SciPy-Dev mailing list