Python PKG-INFO parsing

Find egg info for installed packages with a namespace

Reported by Thomas Lotze on 2012-02-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkginfo
Undecided
Tres Seaver

Bug Description

Something like this:

pkginfo.Installed('foo.bar')

won't find egg info because it isn't looked for in enough places up the directory hierarchy.

The algorithm is to look for egg-info files or directories inside the package or its immediate parent directory, but if the package is nested in one or more namespaces, alongside the distribution is actually one further level up the directory hierarchy for each namespace.

Tres Seaver (tseaver) wrote :

To reproduce::

  $ virtualenv --no-site-packages /tmp/lp934311
  $ cd /tmp/lp934311
  $ bin/easy_install pkg_info zope.interface
  $ bin/pkginfo zope.interface
  No PKG-INFO found for package: zope.interface
   warnings.warn('No PKG-INFO found for package: %s' % self.package_name)

Changed in pkginfo:
status: New → Confirmed
Tres Seaver (tseaver) wrote :

Note that we have two issues:

 - namespace packages installed as eggs (e.g., in a virtualenv, as above).

 - namespace packages installed in a "site" directory (e.g., via a package manager).

Tres Seaver (tseaver) wrote :
Changed in pkginfo:
assignee: nobody → Tres Seaver (tseaver)
status: Confirmed → Fix Committed
Tres Seaver (tseaver) wrote :

Released with version 0.9:

  https://pypi.python.org/pypi/pkginfo/0.9

Changed in pkginfo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers