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

Prefer wheels during plugin install #4877

Closed
stuhood opened this issue Sep 19, 2017 · 3 comments
Closed

Prefer wheels during plugin install #4877

stuhood opened this issue Sep 19, 2017 · 3 comments
Assignees

Comments

@stuhood
Copy link
Member

stuhood commented Sep 19, 2017

Pants has sprouted a dependency on a package that is most easily installed via a whl on pypi (openssl for requests[security]).

But currently the plugin installation infrastructure does not enable usage of WheelPackage due to a defensive avoidance of assuming that wheel is installed in an environment that pants is being loaded from:

# When bootstrapping plugins without the full pants python backend machinery in-play, we are not
# guaranteed a properly initialized interpreter with wheel support so we enforce eggs only for
# bdists with this custom precedence.
precedence = (EggPackage, SourcePackage)

As far as @kwlzn or I can tell, wheel should always be on the PYTHONPATH, as pants itself depends on it: it's not clear that it actually needs to be "installed" on the PATH as well.

cc @jsirois for any context he might have on that comment.

@stuhood stuhood self-assigned this Sep 19, 2017
@jsirois jsirois self-assigned this Sep 23, 2017
@jsirois
Copy link
Contributor

jsirois commented Sep 23, 2017

I'm still not fully sure about the comment. That said, adding WheelPackage to the head of the precedence list (or deleting the custom precedence argument), leads to a new error - pkg_resources from setuptools==30.0.0, which Pants uses, does not know how to find plugins except if they reside in eggs. Newer versions setuptools>=34.2.0 can do this however (http://setuptools.readthedocs.io/en/latest/history.html#v34-2-0).

@jsirois
Copy link
Contributor

jsirois commented Sep 24, 2017

OK, newer setuptools cannot in fact deal with wheels in raw form, but adding some plugin resolution code to install wheels and activate them does the trick. PR soon.

@kwlzn
Copy link
Member

kwlzn commented Sep 25, 2017

thanks @jsirois !

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

No branches or pull requests

3 participants