[Distutils] distlib updated to include "entry point" functionality

Vinay Sajip vinay_sajip at yahoo.co.uk
Mon Oct 8 22:56:48 CEST 2012


Lennart Regebro <regebro <at> gmail.com> writes:

>> IIUC, you're allowed to just define a module or package without the
>> attributes appearing after the ":"
> 
> Right, but isn't that then an entry point?
> 

How is it an entry point? Perhaps I'm misunderstanding what an entry point is,
but to my mind it's the start of some code. Of course a module runs code when
imported, but the module may already have been imported when the entry point is
loaded - in which case, nothing would get run at load time, IIUC. Even if it
wasn't imported before, I'm not sure whether you'd want to import a module just
for side-effects caused by the import.

> I agree REGISTRY is not a very good name in any case.

Like I said, I only chose it because it's similar to other filenames in
.dist-info, and I'll entertain alternative bikeshed colours ;-)

I've added read_registry and write_registry methods to Distribution which take
an optional filename; this allows reading from alternative filenames, which is
handy for testing, at least.

Regards,

Vinay Sajip




More information about the Distutils-SIG mailing list