pypa/pip — pull request #696 by adiroiban (2012-10-02 20:29:03+00:00)
Title: --find-links detection for files generated by --download-cache

Hi,

Problem description
===============

--download-cache is nice to avoid re-downloading files.

--find-links does not recognizes files created using --download-cache since the repository name is contained in the file name.

It would be nice if --find-links could also use cached files.

This problem was also raised in #246 but it look like the original reported did not continue to support it.

Changes
=======

The regular expression for _egg_info_re was updated to extract the package name from file names created using --download-cache options.

RE named groups are used instead of group numbers.

The tests were done on 'private' method. Not sure if this is the right thing to do, but I saw some other tests for private methods.

I wanted to add the test on a public method, but PackageFinder.find_requirement is doing a lot of things and it would be hard to focus the test.

This is my first contribution to pip, so there is high probability of doing something wrong.
Please do not hesitate to raise any issues, even minor ones.

How to test
=========

Test were added for PackageFinder._egg_info_matches

```
nosetests tests.test_index
```

Thanks!