[Distutils] Wheel support added to distlib

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Feb 20 03:03:05 CET 2013


Marcus Smith <qwcode <at> gmail.com> writes:

> when I run "wheeler.py pyramid" (after taking out the --no-deps you just
> added), 
> 
> I get one wheel for mako:  Mako-0.7.3-py33-none-any.whl
> 
> I'm not seeing how this could build wheels for all the dependencies?
> where is that logic?
> I can certainly be missing it.

I was getting a little carried away with the possibilities :-( You can
certainly get pip to install all the dependencies in the workdir that's set up,
but the wheel format is designed only for one distribution per wheel (one
.dist-info only). Hence, wheels work just like other distribution archives,
except that they have built files (this doesn't of course buy us much for
pure-Python projects, but is great for dists with C extensions).

If you take out --no-deps from wheeler.py, you'll just get a wheel which is
named after a random one of the dists downloaded, and there may well be
multiple .dist-info files in the wheel, but that's contrary to its design - so
--no-deps needs to stay in there.

Just thinking out loud - for a built distribution format to handle dependencies
correctly, you could consider extending the wheel format for multiple dists
ABC, DEF etc., e.g. by

(a) Moving the package files to ABC.data/purelib, DEF.data/platlib, etc. rather
    than having them in the root of the wheel.
(b) Having ABC.dist-info, DEF.dist-info etc. each with its own METADATA, RECORD
    etc.
(c) If there were more than one .dist-info, there'd be no obvious place for the
    WHEEL file to live, so a home would need to be found for it.

This doesn't buy you any more than, say, having a "super-wheel" archive which
just contains a bunch of wheels for a distribution and its dependencies. If
it's all built in one step you would have common tags, and you would name the
super-wheel after the main distribution with a different extension indicating
its super status: Thus, Flask-0.9-py27-none-any.XXX (whatever extension is
chosen) would contain e.g. Werkzeug-0.8.3-py27-none-any.whl,
Jinja2-2.6-py27-none-any.whl and Flask-0.9-py27-none-any.whl. To install a
super-wheel you would just extract and install its individual wheels.

Just a thought :-)

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list