At 01:10 PM 6/15/2009 +0200, Brian Sutherland wrote:
Thanks, I've just released a prototype:

    http://pypi.python.org/pypi/van.reposync

However, as I did not want to actually execute code contained in the
tarball, I did something like this:

    basedir = os.path.dirname(egg_info)
    metadata = PathMetadata(basedir, egg_info)
    dist_name = os.path.splitext(os.path.basename(egg_info))[0]
    dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

Unfortunately I had to play some guessing games to find where the
.egg-info directory was.

Actually, if all you want is the name and version, I suppose you could parse the PKG-INFO, which is always in a set location in an sdist tarball or zip.

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to