Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

pip gets confused by .egg-info directories #414

Open
lebedov opened this Issue · 3 comments

2 participants

@lebedov

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.

@dbarnett

I can't reproduce this issue using these exact versions of the packages you listed and these exact instructions.

Here's my output from pip install --verbose for the command in question:

Unpacking ./dist/anyjson-0.3.1.tar.gz
  Running setup.py egg_info for package from file:///home/david/projects/anyjson-0.3.1/dist/anyjson-0.3.1.tar.gz
    running egg_info
    creating pip-egg-info/anyjson.egg-info
    writing pip-egg-info/anyjson.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/anyjson.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/anyjson.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
Installing collected packages: anyjson
  Running setup.py install for anyjson
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-i686-2.7
    creating build/lib.linux-i686-2.7/anyjson
    copying anyjson/__init__.py -> build/lib.linux-i686-2.7/anyjson
    running install_lib
    creating /tmp/TEST/lib/python2.7/site-packages/anyjson
    copying build/lib.linux-i686-2.7/anyjson/__init__.py -> /tmp/TEST/lib/python2.7/site-packages/anyjson
    byte-compiling /tmp/TEST/lib/python2.7/site-packages/anyjson/__init__.py to __init__.pyc
    running install_egg_info
    running egg_info
    writing anyjson.egg-info/PKG-INFO
    writing top-level names to anyjson.egg-info/top_level.txt
    writing dependency_links to anyjson.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'anyjson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'anyjson.egg-info/SOURCES.txt'
    Copying anyjson.egg-info to /tmp/TEST/lib/python2.7/site-packages/anyjson-0.3.1-py2.7.egg-info
    running install_scripts
    writing list of installed files to '/tmp/pip-gvBT02-record/install-record.txt'
Successfully installed anyjson
Cleaning up...

Maybe you could add --verbose to your pip install command and post the output for comparison?

@lebedov
Unpacking ./dist/anyjson-0.3.1.tar.gz
  Running setup.py egg_info for package from file:///tmp/anyjson-0.3.1/dist/anyjson-0.3.1.tar.gz
    running egg_info
    creating pip-egg-info/anyjson.egg-info
    writing pip-egg-info/anyjson.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/anyjson.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/anyjson.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
Cleaning up...
@dbarnett

Here's a snippet from a trace of pip running on my machine:
https://gist.github.com/1918884

Could you run

/tmp/TEST/bin/python -m trace --trace /tmp/TEST/bin/pip install dist/anyjson-0.3.1.tar.gz

as opposed to

/tmp/TEST/bin/pip install dist/anyjson-0.3.1.tar.gz

find the line corresponding to the beginning of my snippet, and see if you can find a point where your and my traces diverge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.