[Distutils] Wheels and console script entry point wrappers (Was: Replacing pip.exe with a Python script)

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Jul 17 09:40:13 CEST 2013

Nick Coghlan <ncoghlan <at> gmail.com> writes:

> Actually, it may be better to have a top level "scripts" field, distinct
from a general export mechanism.
> I'm seeing value in an exports mechanism, though.

The exports functionality is important and used enough to warrant support in
the PEP, and not only for the scripts part. There should be some way that
this data gets into .dist-info in a standardised way, so that there is an
ability to query e.g. implementations of a particular interface. Currently,
distlib supports this as an extension to the PEP by reading a file from
.dist-info, which distil puts there. At the moment the PEP is silent on the
subject, which could lead to fragmentation in the implementations - e.g.
whether JSON Or ini-style format is used for the data.

I'd like to suggest that the whole of the exports information be included in
the PEP 426 metadata, without singling out the scripts part. That way, it
ends up in .dist-info via pydist.json. It has been suggested by PJE that the
exports information should be in a separate file for speed of searching -
though that suggestion was made in a pre-JSON world, where the speed of
parsing the metadata wasn't C-assisted. Should performance still be an
issue, then the exports dict could still be written out separately in
.dist-info as e.g. exports.json by an installer.


Vinay Sajip

More information about the Distutils-SIG mailing list