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

Nick Coghlan ncoghlan at gmail.com
Wed Jul 17 02:17:22 CEST 2013

On 17 Jul 2013 10:03, "Donald Stufft" <donald at stufft.io> wrote:
> On Jul 16, 2013, at 8:00 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On 17 Jul 2013 04:19, "Vinay Sajip" <vinay_sajip at yahoo.co.uk> wrote:
>> >
>> >
>> >
>> > >If I were writing a firm proposal, I'd go for something like entry
points as metadata
>> >
>> > My extended metadata already covers this, though I use the name
"exports" (suggested by PJE) because you can share not just code but data,
and "entry points" generally implies code. The current version of distil
creates wrappers for both gui and console scripts, and adds the appropriate
native executable wrappers (32- or 64-bit, according to the running Python)
on Windows.
>> Yeah, originally we were going to postpone dealing with entry points to
a metadata extension (Daniel even had a proto-PEP kicking around in the
pre-JSON days).
>> However, I now think it makes more sense to standardise them as an
"exports" field in PEP 426. So run with the assumption that something like
that will be part of the standard metadata - either derived from
entry_points.txt for existing metadata, or specified directly for next
generation metadata.
>> Cheers,
>> Nick.
>> _______________________________________________
>> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> http://mail.python.org/mailman/listinfo/distutils-sig
> Are these only the scripts portion of entry points, or the whole kit and
caboodle of pluggable entry points? Because I think the first makes sense,
the second I'm hesitant on.

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. Yes, *in theory* you can
get the same effect with an extension, but extensions can do a lot of other
things, too. Python's metaprogramming is built on a model of multiple tools
with increasing levels of power, flexibility and complexity, so I'm
thinking an exports vs extensions split may be a good approach in a similar

No decision on this front yet, but I think it's at least worth my trying it
out to see how it looks in the context of the PEP. (After all, we already
know entry points are quite a popular feature of the setuptools metadata)

A couple of bonus features of standardisation are that we can tie it into
the extras system and automatic analysis tools can check the exports can
actually be imported without needing to understand arbitrary extensions.


> -----------------
> Donald Stufft
> PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130717/f9dbc698/attachment-0001.html>

More information about the Distutils-SIG mailing list