Skip to content

Why does pip wheel -r skip editable requirements? #3291

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

Closed
sbidoul opened this issue Dec 5, 2015 · 5 comments · Fixed by #3695
Closed

Why does pip wheel -r skip editable requirements? #3291

sbidoul opened this issue Dec 5, 2015 · 5 comments · Fixed by #3695
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@sbidoul
Copy link
Member

sbidoul commented Dec 5, 2015

After reading the documentation, I'm hoping the release process for my project could look like this:

pip freeze -r dev-requirements.txt > release-requirements.txt
pip wheel -r release-requirements.txt --wheel-dir=release

Since my dev-requirements.txt contains editable references to several VCS controlled directories, pip freeze generates lines such as -e [email protected]:...#egg=.... That looks completely ok so far.

However pip wheel then says Skipping bdist_wheel for ... due to being editable, which is not good. Removing the -e in the frozen requirements does not help because [email protected]:... is not accepted as requirements lines.

So I'm wondering if the above pip freeze + pip wheel is a correct workflow (which I hope).

My main question being why pip wheel needs to skip editable packages. I found a comment by @qwcode in #1775 hinting at something, but I could not understand the rationale. I my use case (ie releasing a project), it is perfectly desirable to have a wheel generated for editable requirements.

@xavfernandez
Copy link
Member

Well the point of installing an editable (-e) is to be able to edit the installed directory (without fiddling inside the site-packages). It is based on setuptools's develop command and as such can not be installed via a wheel (at least not in a trivial way, since it does not contain any setup.py file).

You can however pip wheel git+https://github.com/pypa/pip.git or pip wheel git+ssh://[email protected]/pypa/pip.git (without the -e switch).

The [email protected]:pypa/pip.git syntax is currently not supported for non-editable install.

@sbidoul
Copy link
Member Author

sbidoul commented Dec 18, 2015

@xavfernandez thanks for looking into this. While I think I understand the point of -e, I don't see why I could release my project with pip wheel because there is and editable package in my environment.

Let my explain with a working example. Let's say I'm working on a project called git aggregator.

I first install it with pip install -e git+https://github.com/acsone/git-aggregator.git.

Then when I'm ready to release to production I freeze with pip freeze > frozen-reqs.txt. With frozen-reqs.txt looking like this (edited to remove the -master suffix - see #3296):

argcomplete==1.0.0
colorama==0.3.5
-e [email protected]:acsone/git-aggregator.git@d6a594b7175d9615cad0ca805aa4690ed273500e#egg=git_aggregator
kaptan==0.5.8
PyYAML==3.11

And then I want to package it for production with pip wheel -r frozen-reqs.txt --wheel-dir=release.

And, bummer, the result is incomplete because pip skips my editable package.

Admitedly I could post-process frozen-reqs.txt to remove the -e, etc, but it's a pity to have to do that, especially since reading the documentation on repeatability, I expect the process to be seamless.

Moreover #3379 does work and does not break any test.

@gsemet
Copy link

gsemet commented Jul 8, 2016

I would like to have an option in pip wheel to force creation of wheel even for editable elements

@sbidoul
Copy link
Member Author

sbidoul commented Jul 8, 2016

@stibbons this is done in #3695 and will therefore be in the next pip release.

@gsemet
Copy link

gsemet commented Jul 8, 2016

great ! Thanks!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants