[Distutils] PEP425 - Wheel Binary Package Compatibility

Olivier Grisel olivier.grisel at ensta.org
Tue Oct 28 16:20:38 CET 2014


2014-10-28 15:04 GMT+01:00 Paul Moore <p.f.moore at gmail.com>:
> On 28 October 2014 10:13, Matthias Hafner <hafner87 at gmail.com> wrote:
>
> (in reverse order, easiest to hardest :-))
>
>> Why does that work on MacOS, btw? Are all library versions fixed there for
>> one version of OSX?
>
> I believe (I'm not 100% sure as I'm a Windows user not an OSX user)
> that PyPI only supports binaries compatible with the official
> python.org binaries of Python. So library version decisions are moot.
> This means that homebrew or "the other ones" (sorry :-)) users can't
> avail themselves of PyPI-hosted binaries yet, until the wider library
> compatibility issues are resolved.

Homebrew-installed Python and the system Python that comes by default
on OSX are binary compatible with wheels generated with Python from
the official OSX installer from python.org.

In current versions of pip you "just" have to rename the wheel
filenames to get them picked up from PyPI on those platforms.

This explains the strange names of the OSX wheels for numpy for instance:

numpy-1.9.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl
numpy-1.9.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl
numpy-1.9.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl

https://pypi.python.org/pypi/numpy

macosx_10_9_x86_64 is the platform tag used by Homebrew-installed
Python while macosx_10_6_intel is the platform tag of the python.org
Python.

Off-course if your python extension link to non-system libraries, you
have to embed them in the wheel, for instance using:

https://pypi.python.org/pypi/delocate

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel


More information about the Distutils-SIG mailing list