[Distutils] Utility to mirror an egg index from a Debian distribution
P.J. Eby
pje at telecommunity.com
Mon Jun 15 17:08:22 CEST 2009
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.
More information about the Distutils-SIG
mailing list