[Catalog-sig] Distinguishing PEP 345 distributions from old ones.

Tarek Ziadé tarek at ziade.org
Thu May 24 15:26:00 CEST 2012


On 5/24/12 3:07 PM, Alexis Métaireau wrote:
>> the metadata version, which is 1.2
>
> That doesn't seem to be available in PyPI direclty, nor via the 
> XML-RPC interface: http://pypi.python.org/pypi/pelican/json
>
>>>> import xmlrpclib
>>>> client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
>>>> client.release_data('Pelican', '2.8.1')/keys()

Weird, I could have swore it was in there. We should add the 
'metadata_version' key.

In the interim you can detect when it's a 1.2 because it has specific 
fields , by loading the metadata in a packaging.metadata.Metadata instance
and ask it to detect the version.

You can try with http://pypi.python.org/pypi/gitbuster/

(notice the UI that lists the dependencies)

Also, as discussed with Richard we said we would publish 'setup.cfg' in 
PyPI. So that will be another way

Cheers
Tarek


More information about the Catalog-SIG mailing list