[Distutils] Plans for binary wheels, and PyPi and OS-X
nad at acm.org
Sat Nov 2 01:37:36 CET 2013
In article <527434D6.9020603 at canterbury.ac.nz>,
Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Donald Stufft wrote:
> > python -c "import distutils;
> > print(distutils.util.get_platform().replace('.', '_').replace('-', '_'))"
> > macosx_10_8_x86_64
> Hmm, this just appears to reflect the version of MacOSX
> that the Python running distutils was built on, or is
> running on (not sure which).
> This is not quite the same thing as MACOSX_DEPLOYMENT_TARGET,
> which is the minimum version of MacOSX that is needed to
> run a piece of code.
> Distutils seems to assume they're the same, but if you're
> building a binary wheel for distribution, it makes sense
> to set MACOSX_DEPLOYMENT_TARGET as low as possible.
> Will there be a mechanism to get the actual MacOSX version
> needed into the metadata, rather than the one you happen
> to be building on?
Assuming that the wheel build is using distutils.util.get_platform(), that
number *is* the value of MACOSX_DEPLOYMENT_TARGET that was used when Python
was built unless it is overridden during execution of Python by setting a
MACOSX_DEPLOYMENT_TARGET env variable.
For example, with the python.org 64-bit installer used on OS X 10.8:
$ /usr/local/bin/python2.7 -c 'import
It works on 10.6, 10.7, 10.8, and 10.9.
With the Apple supplied system Python 2.7 on OS X 10.8:
$ /usr/bin/python2.7 -c 'import
nad at acm.org
More information about the Distutils-SIG