Skip to content
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

pip does not install extras_requires for console_scripts #48

Closed
wickman opened this issue Feb 15, 2015 · 4 comments
Closed

pip does not install extras_requires for console_scripts #48

wickman opened this issue Feb 15, 2015 · 4 comments

Comments

@wickman
Copy link
Contributor

wickman commented Feb 15, 2015

This seems like a bug in pip, however it manifests itself in a broken pex tool if you 'pip install pex' into an empty virtualenv:

mba=pex=; virtualenv dist/pex_ve
New python executable in dist/pex_ve/bin/python2.7
Also creating executable in dist/pex_ve/bin/python
Installing setuptools, pip...done.

mba=pex=; source dist/pex_ve/bin/activate

(pex_ve)mba=pex=; pip install dist/pex-0.8.7-dev0.tar.gz 
Unpacking ./dist/pex-0.8.7-dev0.tar.gz
  Running setup.py (path:/var/folders/rd/_tjz8zts3g14md1kmf38z6w80000gn/T/pip-hYkm9F-build/setup.py) egg_info for package from file:///Users/wickman/clients/pex/dist/pex-0.8.7-dev0.tar.gz

    warning: no files found matching 'docs/*.md'
Requirement already satisfied (use --upgrade to upgrade): setuptools>=2.2,<8 in ./dist/pex_ve/lib/python2.7/site-packages (from pex==0.8.7-dev0)
Installing collected packages: pex
  Running setup.py install for pex

    warning: no files found matching 'docs/*.md'
    Installing pex script to /Users/wickman/clients/pex/dist/pex_ve/bin
Successfully installed pex
Cleaning up...

(pex_ve)mba=pex=; pip list
pex (0.8.7-dev0)
pip (1.5.6)
setuptools (3.6)
wsgiref (0.1.2)

(pex_ve)mba=pex=; pex --help
Traceback (most recent call last):
  File "/Users/wickman/clients/pex/dist/pex_ve/bin/pex", line 9, in <module>
    load_entry_point('pex==0.8.7-dev0', 'console_scripts', 'pex')()
  File "/Users/wickman/clients/pex/dist/pex_ve/lib/python2.7/site-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/wickman/clients/pex/dist/pex_ve/lib/python2.7/site-packages/pkg_resources.py", line 2431, in load_entry_point
    return ep.load()
  File "/Users/wickman/clients/pex/dist/pex_ve/lib/python2.7/site-packages/pkg_resources.py", line 2145, in load
    if require: self.require(env, installer)
  File "/Users/wickman/clients/pex/dist/pex_ve/lib/python2.7/site-packages/pkg_resources.py", line 2159, in require
    items = working_set.resolve(reqs, env, installer)
  File "/Users/wickman/clients/pex/dist/pex_ve/lib/python2.7/site-packages/pkg_resources.py", line 639, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: wheel>=0.24.0,<0.25.0

In the meantime we should remove the extras_requires from pex. This means in order to build pexes with wheels (the default option) we will need an interpreter cache #47.

@mitsuhiko
Copy link

There is a related issue to this: https://gist.github.com/mitsuhiko/9ee3c30defba57bf04bf

@mitsuhiko
Copy link

I suppose if you want to keep wheels optional it makes sense to imply the -no-wheel option.

@wickman
Copy link
Contributor Author

wickman commented Feb 15, 2015

I think the untranslateable thing might be due to a timeout in the UrllibContext which is the default if requests is not linked into the pex. The RequestsContext has http retries built-in whereas the UrllibContext does not, which causes no end of grief for users in general.

My inclination is to make wheel/requests optional but on by default (in other words you can disable them but you have to try), and use the interpreter cache to resolve them if they're not present on the system / in the virtualenv.

wickman added a commit to wickman/pex that referenced this issue Apr 3, 2015
…tool#48.

* Adds an interpreter cache to the pex tool and self-resolves dependencies
  (wheel, setuptools) should they be unavailable at runtime.  This fixes the
  issue where "pex" would fail to run in a fresh virtualenv without doing
  "pip install pex[whl]".

* Fixes test breakage with requests >= 2.5.2
wickman added a commit that referenced this issue Apr 4, 2015
Adds an interpreter cache to the pex tool.  Fixes #47 and #48.
@wickman
Copy link
Contributor Author

wickman commented Apr 4, 2015

Fixed by e4a577ef0

@wickman wickman closed this as completed Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants