New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wheels prevent subsequent extras_require installs from working #1885

Closed
minrk opened this Issue Jun 18, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@minrk
Contributor

minrk commented Jun 18, 2014

When installing extras after installing a package, the extras will not be installed if the original package was a wheel.

pip install ipython
pip install ipython[test]

should include the testing dependencies nose and mock, but it doesn't.

With wheel

Installing with the IPython wheel:

(testpip) $ pip install ipython
Downloading/unpacking ipython
Downloading/unpacking gnureadline (from ipython)
Installing collected packages: ipython, gnureadline
Successfully installed ipython gnureadline
Cleaning up...
(testpip) $ pip install ipython[test]
Requirement already satisfied (use --upgrade to upgrade): ipython[test] in /Users/minrk/env/testpip/lib/python2.7/site-packages
  Installing extra requirements: 'test'
Cleaning up...
(testpip) $ pip list
gnureadline (6.3.3)
ipython (2.1.0)
pip (1.5.dev1)
setuptools (1.4)
wsgiref (0.1.2)

Fails to install the dependencies

Without wheel

If I prevent the wheel from being installed the first time, it works:

(testpip2) $ pip install --no-use-wheel ipython
Downloading/unpacking ipython
  Downloading ipython-2.1.0.tar.gz (11.9MB): 11.9MB downloaded
  Running setup.py (path:/Users/minrk/env/testpip2/build/ipython/setup.py) egg_info for package ipython
                  readline: yes

Installing collected packages: ipython
...
Successfully installed ipython
Cleaning up...
(testpip2) $ pip install ipython[test]
Requirement already satisfied (use --upgrade to upgrade): ipython[test] in /Users/minrk/env/testpip2/lib/python2.7/site-packages
  Installing extra requirements: 'test'
Downloading/unpacking nose>=0.10.1 (from ipython[test])
Downloading/unpacking mock (from ipython[test])
Installing collected packages: nose, mock
Successfully installed nose mock
Cleaning up...
(testpip2) $ pip list
gnureadline (6.3.3)
ipython (2.1.0)
mock (1.0.1)
nose (1.3.3)
pip (1.5.dev1)
setuptools (1.4)
wsgiref (0.1.2)

I think I've tracked it down to parsing requires.txt from egg_info, when it should be looking in the wheel metadata.

@dholth

This comment has been minimized.

Show comment
Hide comment
@dholth

dholth Jun 19, 2014

Member

I'm surprised pip is using its own parser at all. It is really easy and future proof to use the pkg_resources or distlib? API to get the dependencies; pip does that when it is installing wheels.

Member

dholth commented Jun 19, 2014

I'm surprised pip is using its own parser at all. It is really easy and future proof to use the pkg_resources or distlib? API to get the dependencies; pip does that when it is installing wheels.

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Jun 26, 2014

Member

Closed via #1896

Member

dstufft commented Jun 26, 2014

Closed via #1896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment