[Distutils] Adding entry points into Distutils ?

Hanno Schlichting hannosch at hannosch.eu
Wed May 6 20:28:36 CEST 2009

Doug Hellmann wrote:
> On May 6, 2009, at 1:46 PM, P.J. Eby wrote:
>> At 10:59 AM 5/6/2009 -0400, Doug Hellmann wrote:
>>> On May 5, 2009, at 10:50 PM, P.J. Eby wrote:
>>>> At 12:03 PM 5/6/2009 +1000, Ben Finney wrote:
>>>>> I don't see any advantage, in the context of this discussion, to
>>>>> having an additional, incompatible naming for full-path-to-a-class.
>>>> Setuptools doesn't limit an entry point to being a class, function,
>>>> or other top-level name within a module.  It can be a method of a
>>>> class, or an attribute of an attribute.  The ':' removes any
>>>> ambiguity as to which part of the name is the module, and which
>>>> parts are attributes within that module.
>>> Is that level of complexity useful in practice?  I can understand how
>>> it came to be implemented, but is it actually used by any projects?
>> I use it; I'm not sure who else does.
>> The particular use case I have (and that's most likely to be shared)
>> is that the calling app or framework wants a callable or function, but
>> the providing app or library implements that callable as a classmethod
>> for convenience.
> That's pretty much what I expected.  It feels a little messy to have
> plugins exposing "internals" like that but not so much so that I propose
> we don't allow it. The ":" syntax seems like the right way to go.

I'd be tempted to call this an edge-case. You should be able to expose
the internal detail you'd need via a module scope alias for the
particular case. That seems easier than providing a whole new notion.


More information about the Distutils-SIG mailing list