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

allow creating wheels for editable packages #3379

Closed
wants to merge 1 commit into from

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Jan 19, 2016

Fixes #3291

This lifts the restriction of not generating wheels for editable packages.

As explained in #3291, there are legitimate scenarios for this, such as building wheels from frozen requirements.

Review on Reviewable

@xavfernandez
Copy link
Member

There might be legitimate reason but I don't think it should be the default behavior: if the user did not update the editable package's version in setup.py, it will end up with a wheel named pkg-1.5.2-py2.py3-none-any.whl but different than the correctly generated pkg-1.5.2-py2.py3-none-any.whl.

This hazardous behavior could be enable via an --allow-editable (or some nicer name) option however.

cc @qwcode since you commented on #1775 :)

@sbidoul
Copy link
Member Author

sbidoul commented Jan 19, 2016

Ah, now I understand the reason. Thanks for the explanation, @xavfernandez.

I'll close this one and see if I can come up with a better solution.

@sbidoul sbidoul closed this Jan 19, 2016
@sbidoul
Copy link
Member Author

sbidoul commented Feb 9, 2016

@xavfernandez regarding your #3379 (comment) above, it looks like one can do pip wheel git+https://something... and the user can also have forgotten to update the version in that setup.py.

So I'm back to not understanding the restriction again.

@xavfernandez
Copy link
Member

And you can also do pip wheel ./some_local_directory.
So indeed you already have ways to shoot yourself in the foot and this limitation on editable does not make that much sense.
We could maybe imagine printing out warnings on these border cases but I'm not sure it would be useful.

@xavfernandez xavfernandez reopened this Feb 9, 2016
@xavfernandez
Copy link
Member

On the other hand, I don't see the use case for wanting a wheel of an editable...
From #3291, it looks like this PR is a workaround for issue #2994.

@sbidoul sbidoul force-pushed the wheel-editable-sbi branch 4 times, most recently from 2d99b12 to b8374ba Compare February 10, 2016 10:03
@sbidoul
Copy link
Member Author

sbidoul commented Feb 10, 2016

@xavfernandez thanks for pointing me #2994.

That's not the core of my issue though. Really, when I pip freeze my project (an application, not a library), I get lines with -e. So I really expect to be able to pip wheel -r frozen-requirements.txt without fiddling with the output of pip freeze.

If remove the -e from my frozen requirements, it works, but it does a full git clone of my git dependencies in temporary directories. And that's really an issue because I have one dep (Odoo, to name it) where git clone means dowloading 1GB. If I can do a pip wheel from the editable requirement, it uses the clone I already have in src for development.

So all in all, being able to pip freeze editable requirements is really helpful for the development workflow of applications.

I updated the PR with a more correct solution (the failure is a transient travis error).

@sbidoul
Copy link
Member Author

sbidoul commented Feb 18, 2016

@xavfernandez is my use case valid? If positive I can work on a test.

@piotr-dobrogost
Copy link

Could some maintainer take a look at this and hopefully give a green light?

@dstufft dstufft closed this May 18, 2016
@dstufft
Copy link
Member

dstufft commented May 18, 2016

Accidentally closed this, reopening. Sorry!

@dstufft dstufft reopened this May 18, 2016
@BrownTruck
Copy link
Contributor

Hello!

As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the master branch. However, this Pull Request was made against the develop branch so it will need to be resubmitted against master.

If you do nothing, this Pull Request will be automatically migrated by @BrownTruck for you.

If you would like to retain control over this pull request then you should resubmit it against the master branch, closing and referencing the original Pull Request.

If you choose to migrate this Pull Request yourself, here is an example message that you can copy and paste:

Fixes #3291 

This lifts the restriction of not generating wheels for editable packages.

As explained in #3291, there are legitimate scenarios for this, such as building wheels from frozen requirements.

---

*This was migrated from pypa/pip#3379 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*

If this pull request is no longer needed, please feel free to close it.

@sbidoul
Copy link
Member Author

sbidoul commented May 19, 2016

reparented to the master branch in #3695

@sbidoul sbidoul closed this May 19, 2016
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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 this pull request may close these issues.

5 participants