[Distutils] the 'wheel' binary package format

Daniel Holth dholth at gmail.com
Wed Aug 15 18:05:35 CEST 2012

On Wed, Aug 15, 2012 at 11:55 AM, M.-A. Lemburg <mal at egenix.com> wrote:
> You might also want to take a look at the "prebuilt" binary
> format which we have been using for several years now, e.g.
> http://www.egenix.com/products/python/mxBase/
> The idea is a little different from what you describe, but works
> well: we essentially take a snapshot of the package after it was
> built and then put everything into a ZIP file.
> As a result, you can pick up where distutils left off after the
> build and continue the installation on the target machine.

Thanks, that is fascinating. Wheel goes a little further, and zips up
an installation of the package (with a particular set of installation
paths), and it doesn't include setup.py. This is important because I
want to be able to install into a Python that has no distutils at all.

> The prebuilt files can also be installed and uninstalled with pip
> if you reference the files directly.
> The only feature missing is support in pip for finding and downloading
> the right prebuilt archive from an index server. pip currently defaults
> to downloading the Windows builds, because it checks for the "highest"
> version available (for some meaning of high ;-)).
> Which makes me think: would it be possible to make pip more clever
> with respect to platform version strings ?

I do plan to implement this with some help from my friends, at least
as defined by PEP 425 (in progress;
http://hg.python.org/peps/file/tip/pep-0425.txt ). I think it will be
necessary to introduce the concept of picking the best package from a
set of candidates with the same version, instead of just picking the
highest version as pip does now.

> Here's are some examples of such a version strings as detected by
> pip:
> 3.2.4.win32-py2.7.prebuilt
> 3.2.4.win-amd64-py2.7.prebuilt
> 3.2.4.linux-x86_64-py2.7_ucs4.prebuilt
> 3.2.4.linux-x86_64-py2.7_ucs2.prebuilt
> 3.2.4.linux-i686-py2.7_ucs4.prebuilt
> 3.2.4.linux-i686-py2.7_ucs2.prebuilt
> The code for bdist_prebuilt is in the mxSetup.py that comes with
> egenix-mx-base, in case you want to take a look.

I will take a look.



More information about the Distutils-SIG mailing list