-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Explicitly declare our build backend #1674
Conversation
This change more accurately reflects that ``setuptools`` is intended to use the ``build_meta`` backend from a previous installation. This may cause some problems with source builds if existing wheels for ``wheel`` and ``setuptools`` are not available. In that event, manually building a source wheel is recommended.
@pfmoore @pradyunsg Does |
I expect this to break pip needs to be updated for improving that handling and I expect we won't have that until the Discourse discussion reaches some consensus. None the less, until we figure out self-bootstrapping, this should be fine. :) |
@pradyunsg So you are saying you're fine with |
I think we need to resolve the "backend bootstrapping" discussion on Discourse before this can go in. Once we have a solution there (which may involve changes to pip and/or modifications to what you're doing here) then this can go in. For now, my preference would be to put this on hold. |
@pfmoore I think you can see my reasoning on #1644, but I am fairly certain that that discourse thread is going nowhere, certainly nowhere useful. From where I'm standing, the spec should allow for this. If a frontend ( If PEP 517 is ever updated to forbid this, we can switch to the decidedly non-optimal (for everyone involved) option 3 - vendoring wheels of our dependencies in the |
The test failures seem to actually be due to pypa/pip#6197, so I think we can pin |
I'm not willing to get stuck in a confrontation over this, and in particular I'm not going to take a view on "whose problem is it?" while we're trying to establish agreement on what the responsibilities are over on Discourse (I don't share your disillusionment with that thread, although it'll be hard to make progress if setuptools isn't engaged with the process :-() All I'm going to say here is that a cycle in build requirements is logically impossible to resolve if there's no binaries available. So whatever pip does, this change forces a bootstrapping step on anyone starting from a "sources only" environment. I'm not going to judge whether such environments constitute valid use cases, but conversely, if people raise bug reports on pip in that situation, I'll probably point the reporters at setuptools for advice. If people are using That's a complex message to get across, and I'd prefer to avoid the need by postponing this change. But it's not my place to dictate what setuptools does, so if you want to go ahead we can work with the consequences. |
This is certainly true, though it's also true for We can probably put this off for some time, but at some point we'll have to call the discourse thread a waste of time and give up on it. Maybe that's after the discussion peters out or maybe it's because enough people get tired of the discussion that the only people left are the ones who can agree on a path forward. That said, if PEP 517 changes to force bootstrap builds, I imagine the "always build from source" crowd might like that there's a version of |
I would point out that my proposal that I posted yesterday explicitly allowed setuptools to basically land this exact pull request. It highly suggests not landing a PR like this, by saying that backends SHOULD avoid introducing a cyclic build dependency graph but it doesn't explicitly disallow it, since it's not a MUST. I would also note that one of the questions I raised in my proposal was whether we should make it a SHOULD or whether we should make it a MUST. Obviously if we made it a MUST then a PR like this would make setuptools non-compliant with PEP 517 (but obviously the PEP has no teeth to force compliance), in either case, pip will have to detect and reject cyclic build dependencies when attempting to build. In all cases it would mean that |
Hmm, I didn't know that |
I'm not entirely sure why this would be necessary given that this was a deliberate choice and not a bug. I imagine that would just be an exercise in frustration for the user. Presumably if this becomes a problem we can write some documentation to indicate what to do and send users to that, though obviously my preferred solution is something that just works for the users in the first place. |
I mean. That’s not like being passive aggressive about it or anything, it’s just saying that if someone comes to pip because the specific choices made by a project are causing them pain, that’s feedback we’d direct towards that project. The same as If a project opted not to upload a sdist at all and the user came to pip saying —no-binary didn’t work for them.
…Sent from my iPhone
On Feb 6, 2019, at 11:07 AM, Paul Ganssle ***@***.***> wrote:
In all cases it would mean that pip install --no-binary :all: ... would break, and if those people landed on pip's tracker we'd redirect them to setuptools tracker.
I'm not entirely sure why this would be necessary given that this was a deliberate choice and not a bug. I imagine that would just be an exercise in frustration for the user. Presumably if this becomes a problem we can write some documentation to indicate what to do and send users to that, though obviously my preferred solution is something that just works for the users in the first place.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
But if the users say "I want to build everything from source ( |
I ducked out of the discourse thread for a reason, so I'm not really interested in moving that whole discussion onto this random PR. I'm sorry to bring up that I would prefer if we chose a different resolution to the bootstrapping problem. When we have a satisfactory resolution to #1659, I think we can fix the tests for this PR, then we can decide whether or not to land it. If we land it, I suspect that the most useful thing to do would be to put a note in one or more of: packaging.python.org, setuptools documentation and pip. When people inevitably complain, the best thing to do would be to point to that documentation. |
@pganssle Is there a misunderstanding here? I think you're hoping that frontends will be required to use wheels to satisfy build requirements. But we can't - it's not even about |
@pradyunsg To be fair, I'm OK with But if he wants to release this change and deal with the results, then that's fine. And I'm also not being passive aggressive by saying this, it's just the reality of how things are right now, that |
As to the question of deferring it, I suppose having a release that explicitly declares its backend dependencies vs. including them as wheels in the So I suppose there's no advantage in actually rushing this through if |
This is the problem with the framing: I think it's uncharitable to consider this a "bug" in setuptools. It would be a deliberate choice to make explicit that More charitably, we could say that bootstrapping entirely from sdists is out of scope for both projects, and if you have this unusual requirement, you need to built a bootstrap wheel. |
Assuming that both my proposal is accepted and we use the SHOULD terminology then I wouldn’t consider it a bug in setuptools. I’d just consider it an outcome of the choices made and if people want different choices then they would need to provide that feedback to the setuptools project.
If we use the MUST terminology then it would be a setuptools bug.
If we accept a different proposal then who knows, it would depend on the specifics of that proposal.
…Sent from my iPhone
On Feb 6, 2019, at 11:42 AM, Paul Ganssle ***@***.***> wrote:
when it does we'd probably be saying "... and that's caused by a bug in setuptools"
This is the problem with the framing: I think it's uncharitable to consider this a "bug" in setuptools. It would be a deliberate choice to make explicit that setuptools needs a way to bootstrap itself. We could just as easily say it's a "bug" in pip that there's no way to express "build everything from sdists if possible and fall back to wheels to break cyclic build-time dependencies".
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, I wasn't clear. When we have a revision to the PEP, then how we frame the response would depend on the wording on that (and I wouldn't expect it to be a "bug" in anything). Right now, though, I think it's fair to say that this PR does not do what you want it to in conjunction with the existing behaviour in pip. That's why I advise not releasing it yet, and why I'd say to anyone affected that "a change in setuptools triggered this issue" (which is a better way of wording it than "there's a bug in setuptools"). |
To be clear, this does improve the situation, because right now we're not shipping our pip download -d dist --no-binary :all: setuptools
pip install dist/setuptools*.zip So, basically, if you've gathered a source distribution (which you can do by using |
Closing this as not consistent with the newest version of PEP 517. |
Summary of changes
This change more accurately reflects that
setuptools
is intended to use thebuild_meta
backend from a previous installation. This may cause some problems with source builds if existing wheels forwheel
andsetuptools
are not available. In that event, manually building a source wheel is recommended.This may break
pip install --no-binary :all:
, though it's not entirely clear that it will. I would take the position that that this is basically revealing a bug inpip
, but we could also just call this a "breaking change".Closes #1644
Pull Request Checklist