-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Add option to use wheel when installing packages #106
Comments
Original comment by peteut Something like a
|
Original comment by marcelm You can solve the problem in two ways; both make sure that pip 7.0 or later is installed in the virtualenvs that tox creates before it runs The first option is to install tox into a virtual environment and run it from there. The installation will pull in a recent version of virtualenv, which in turn comes with a recent version of pip. The second option is to add pip and wheel to the
All packages listed there will be installed with the old pip version, but then the It seems to me that no changes to tox itself are really required (anymore). As soon as the distributions come with more recent virtualenv versions, this will have solved itself. And if you don’t use a distribution package, then it already works! |
Original comment by @RonnyPfannschmidt as far as i understood it would be suficient if to would install a cached suffuciently recent pip version, pip 7.0 will go as far as building and caching wheels locally of everything |
Original comment by @blueyed
However, pip might do this automatically in the future (creating wheels in a cache and installing it from there). |
Original comment by @hpk42 What about introducing a |
Original comment by @blueyed Just for information and reference: you can make tox use wheels by configuring
And to create the wheels:
|
Original comment by @vmalloc +1 |
Original comment by @bhodorog I do think it would be useful to extend the proposed behavior by having a option (globally and maybe also override-able for each environment) which would allow the user to specify it's own options to the "core" pip install command which installs the project's sdist. I've just been hit by the need to have the package installed with pip1.4 with --pre (pre-development releases). Since others have similar needs (--wheel, I suspect other options to pip install would be usefull) I guess having an option in the ini file like: pip_install_options="any valid option specified by |
Original comment by @hpk42 Needs some experimentation but sounds interesting. Any chance that you could tweak tox yourself and see how well it works? There already is a mechanism for detecting if an venv needs to be re-created, so i guess it's not too hard to try adding the options, and then to try it out on some real projects. |
Original comment by @vmalloc I believe the greatest benefit would come if running "pip wheel --wheel-dir=X --use-wheel ." on the current project dir. This would package the current module, as well as any dependency, to the specified "X" directory (~/.toxcache, or a similar name). Then the installation of the package in the virtualenv can be done with "--use-wheel --find-links=X", which can speed up installation significantly. A good example for this that I've run into is packages depending on lxml, pyzmq or sqlalchemy, requiring some heavy compilation which takes a lot of time and CPU... Wheel speeds up these cases to mere seconds. |
Original comment by @hpk42 What would be involved exactly on tox side? |
im tempted to just declare that recent dev/ci envs should not have pip versions that cant handle the automtic wheel caching |
@RonnyPfannschmidt I would tend to think the same :) |
Sorry for chiming in so late, didn't see the mention previously. I'm only using recent pip versions so the issue is solved for me. I'm fine with relying on the automatic wheel caching logic |
The new pip 1.4 (and virtualenv 1.10) support the wheel package format, and can automatically cache downloaded and built packages in a custom location. This would be extremely useful for tox, as rerunning it multiple times will require no extra build time...
The text was updated successfully, but these errors were encountered: