myint / yolk

Command-line tool for querying PyPI and Python packages installed on your system (with Python 3 support)
https://pypi.python.org/pypi/yolk3k
BSD 3-Clause "New" or "Revised" License
65 stars 11 forks source link

Don't crash on missing PKG_INFO #12

Closed smathot closed 7 years ago

smathot commented 7 years ago

A small fix to catch an issue that can arise when the Python path contains libraries without PKG_INFO, which triggers a ValueError when trying to retrieve the version. For example, I tend to add my git repos to the Python path, but these don't have PKG_INFO, and hence I noticed this problem.

(Incidentally, this seems like a bug in the pkg_resource library too, because trying to retrieve a non-existent version should, if anything, result in an AttributeError, not a ValueError.)

myint commented 7 years ago

Thanks!

smathot commented 7 years ago

You're welcome! Fyi, I'm using yolk3k for a graphical package manager (qtpip).