[Distutils] How Python can have CPAN.

ssteinerX@gmail.com ssteinerx at gmail.com
Sun Dec 27 17:50:30 CET 2009

On Dec 27, 2009, at 11:27 AM, Lennart Regebro wrote:

> On Sun, Dec 27, 2009 at 16:54, ssteinerX at gmail.com <ssteinerx at gmail.com> wrote:
>> I'll update the PyPI checker in the distutilsversion test_pypi_versions.py to provide that information as well.  I think I'll make a separate project (uploaded to PyPI, promise) out of it so we have a shared way to get statistics on PyPI projects.  Is your code for this in the PyPI code repository or were these just quick one-off's?
> Quick one-offs. Here, in fact:
> Takes an hour or two to run.
> from xmlrpc import client
> PYPIURL = 'http://pypi.python.org/pypi'
> pypi = client.Server(PYPIURL)
> for package in pypi.list_packages():
>    for release in pypi.package_releases(package, False):
>        release_urls = pypi.release_urls(package, release)
>        if release_urls:
>            continue
>        release_data = pypi.release_data(package, release)
>        if not release_data.get('download_url', ''):
>            print("Package %s, Release: %s" % (package, release))
>            print("    Did not have releases on PyPI or download URL")
>            print("    Author: %s <%s>" % (release_data['author'],
>                                           release_data['author_email']))
>            print("    Maintainer: %s <%s>" % (release_data['maintainer'],
> release_data['maintainer_email']))

Ok, thanks, I'll throw that into the code, in some form.  

The tarred download would be really handy for this utility as, if there's no .pkl of the data, or the user requests it, I pull  fresh copy.  

Right now, my query is very limited (I'm only looking for version info) and only takes a couple of minutes to build.  

Since I'm going to add more capabilities, having a quick way to refresh the whole thing would be great.

I'll put my version up in the new project and maybe we can work together to get it into some PyPI code or to store the version I build somewhere though building it right on the server would seem to be much faster (if memory intensive).


aka/Steve Steiner

More information about the Distutils-SIG mailing list