nvie/pip-tools — pull request #9 by playpauseandstop (2012-09-26 11:51:38+00:00)
Title: ValueError when pip freeze contains "## FIXME:" lines

Hi,

I've installed latest (and possible only version) of pip-tools, with::

bash-3.2# pip install pip-tools
Downloading/unpacking pip-tools
Downloading pip-tools-0.1.tar.gz
Running setup.py egg_info for package pip-tools

Installing collected packages: pip-tools
Running setup.py install for pip-tools
changing mode of build/scripts-2.7/pip-review from 644 to 755
changing mode of build/scripts-2.7/pip-dump from 644 to 755

changing mode of /usr/local/bin/pip-dump to 755
changing mode of /usr/local/bin/pip-review to 755
Successfully installed pip-tools
Cleaning up...

Then, on trying reviewing my system packages I got,

bash-3.2# pip-review
Warning: cannot find svn location for cElementTree==1.0.5-20051216
Traceback (most recent call last):
File "/usr/local/bin/pip-review", line 149, in
main()
File "/usr/local/bin/pip-review", line 112, in main
installed = list(get_installed_pkgs(editables=False))
File "/usr/local/bin/pip-review", line 66, in get_installed_pkgs
name, version = line.split('==')
ValueError: need more than 1 value to unpack

After simple tracing, I found that ``line`` caused error was::

'## FIXME: could not find svn URL in dependency_links for this package:'

And affected output of ``pip freeze`` was::

## FIXME: could not find svn URL in dependency_links for this package:
cElementTree==1.0.5-20051216

----

So, I fixed ``pip-review`` by ignoring all lines which cannot be splitted with `#egg=` or `==` delimeter.

Also update tests with adding installation of ``cElementTree`` package which caused generation of "## FIXME:" line, but not sure about all its system requirements.