pypa/pip — Issue #414: pip gets confused by .egg-info directories
Author: lebedov
Created: 2011-12-20 18:50:05+00:00
State: open

I'm not sure whether the following behavior is expected or a bug:

If one builds a source tarball for a Python project - say, http://pypi.python.org/pypi/anyjson/0.3.1 - by unpacking the original source and then running `python setup.py sdist` in the source directory, attempting to install the resulting tarball with pip *while one is still in that directory* will silently fail. This seems to be due to the presence of the .egg-info directory created after running `python setup.py sdist`. Here are the steps to reproduce this behavior:

```
$ wget http://pypi.python.org/packages/source/a/anyjson/anyjson-0.3.1.tar.gz
$ tar zxf anyjson-0.3.1.tar.gz
$ cd anyjson-0.3.1
$ python setup.py sdist
...
$ virtualenv /tmp/TEST
$ /tmp/TEST/bin/pip install dist/anyjson-0.3.1.tar.gz
...
$ find /tmp/TEST -name "anyjson*"
$
```
Running pip from another directory succeeds:

```
$ cd ..
$ /tmp/TEST/bin/pip install anyjson-0.3.1/dist/anyjson-0.3.1.tar.gz
...
$ find /tmp/TEST -name "anyjson*"
/tmp/TEST/lib/python2.7/site-packages/anyjson-0.3.1-py2.7.egg-info
/tmp/TEST/lib/python2.7/site-packages/anyjson
```
I'm using pip 1.0.2 with Python 2.7.2, distribute 0.6.24, and virtualenv 1.7.