[Python-Dev] PEP 376
P.J. Eby
pje at telecommunity.com
Fri Jul 3 19:10:48 CEST 2009
At 12:28 AM 7/4/2009 +1000, Nick Coghlan wrote:
>I suspect this limitation of the PEP 302 APIs is the origin of the
>setuptools format that embeds the metadata inside the distribution - it
>lets you get at the metadata without having to assume that it exists
>directly on the filesystem anywhere.
I think you have this backwards; it's setuptools that doesn't care
where (or whether) the metadata exists on the file system; it
delegates metadata operations to a "metadata provider" that's usually
an adapter over a PEP 302 "loader".
See
http://peak.telecommunity.com/DevCenter/PkgResources#supporting-custom-importers
for the API details of how to register support for arbitrary PEP 302
importers and loaders. (Which presumably, Lukasz is using. I didn't
know that anybody was actually using it, but it's nice to know that
the documentation is apparently sufficient for *some* people. ;-) )
More information about the Python-Dev
mailing list