[Python-Dev] PEP 376 and PEP 302 - allowing import hooks to provide distribution metadata

Tarek Ziadé ziade.tarek at gmail.com
Sun Jul 5 20:43:20 CEST 2009


2009/7/5 P.J. Eby <pje at telecommunity.com>:
> At 03:13 PM 7/5/2009 +0200, Tarek Ziadé wrote:
>>
>> The loader would still work with "DIST_NAME.egg-info" directories for
>> compatibility with
>> existing format in the query APIs, but the Distutils install command
>> would rather create  "DIST_NAME.metadata"
>
> Note that this would then break setuptools without adding any benefit;
> ".metadata" is less precise and less unique than '.egg-info'.

But if it's based on PEP 302 protocols and if the pkgutil code works
with the sys.meta_path hook,
setuptools could then provide its loader, based on its EggFormats and
act as a provider without being broken.

In that case, Distutils could provide a standard loader, with the
change I mentioned.


> If you want a
> clearer name, '.pydist' or some such would at least be reasonably specific.
>  (It'd still have a backward compatibility problem, but at least then
> there'd be some benefit to the name change.)

I do find "DIST_NAME.metadata" well-named and specific. But I guess that's just
bikeshedding :)


More information about the Python-Dev mailing list