-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Load build backend in isolated build environment with --no-index given #5402
Comments
I'm seeing the same with dateutil, --no-index, and --find-links on Amazon Linux 2017.03 and Python 3.4.3. I have setuptools-39.1.0.zip downloaded in the --find-links directory as well.
|
Just as a data point, I ran into this error by adding a |
I think if you add a [build-system]
requires = ["setuptools", "wheel"] should fix it. |
The presence of |
Oh I think @benoit-pierre has it. All of us seem to be running |
Using |
Indeed. This is exactly the case that makes me think #5416 would be a good idea. |
I don't think that #5416 is relevant here. If you have a It may be that we can find some way of mitigating the impact (try again with build isolation disabled if the build tools aren't available for install, for example, or allow locally installed copies of the requested build tools "leak through" into the isolated build environment) but ultimately we have to bite the bullet and accept that PEP 517 and 518 are moving us into a world where we don't assume build tools are available, and that making sure they are available becomes the responsibility of the user running the build (whether by having local wheels or by manually specifying |
At least with python-dateutil 2.7.1 (which does not specify PEP518 information in |
Yeah, if projects include invalid |
Should the download command include build dependencies, so |
hmmm, I was under the impression that |
It's not pip build information, it's the project build requirements, a (working) replacement for |
I'm sorry I was imprecise, the point stands though -- if it's not a "generic place to put configuration" then that's very very unfortunate. |
@asottile It's defined in PEP 518. that's the relevant standard. The PEP does allow general configuration in there, but only for projects that use If that's "very, very unfortunate", then all I can say is that the problem you're seeing didn't come up in the (extensive) discussions on distutils-sig. It's certainly true that the spec could need change based on real-life feedback as it comes into general use. The PEP can be updated, and the pip implementation updated to follow (I guess the PEP gets altered to make |
I have seen several projects including a |
Yes, I think black might do the same. I'm not sure where the idea that this was acceptable came from, is what I'm saying. |
Eh, the config file was explicitly designed to allow other tools to use it as configuration. I think their use is perfectly fine. The only real question is whether using it for those tools should also opt you into the build isolation and such. I think either answer is OK here. |
Agreed either answer is OK. But the current answer is that if the mandatory key is missing, we reject I'm fine if the consensus is to make that key optional, but I would hope that we update the PEP in line with that decision. The worst case for me would be if the PEP says one thing, but pip does something else. Personally, I prefer the current behaviour, where I can tell if pip will use the new PEP 517/518 processing simply by checking if |
Right now, pip opts-in packages to isolation, based on the presence of This means that if you have a The current behaviour just seems sort of weird to me: the package get opted into isolation because they included configuration for a tool, pip's still sometimes assuming what the build-time requirements are (setuptools+wheel) even in isolation and no one's following the PEP's language. #5512 makes pip compliant with the PEP's language. I'm personally fine with making the build-system.requires key optional; updating the PEP and then updating pip as per that. In that case, it's presence should be used as a pointer on whether to enable PEP 518. |
We're having a discussion about this in 3 places. Can we please move the discussion about dealing with non-compliant pyproject.toml files to #5416? |
To be clear, the solution to OP's issue is providing |
I'm not sure it's related to "incomplete" support, is it? If you pass |
@pfmoore Indeed. My bad. |
No problem - I genuinely wasn't sure whether there was a provision elsewhere in the PEPs that I might have missed. The idea that if you're not using PyPI, it's your responsibility to ensure that your build tools are available to install is something that probably merits a discussion in the PEPs (but quite likely wasn't something we thought about at the time). |
I don't think there's anything actionable here for pip; is there? Is this a case where pip could try printing a better error message? |
yes, instead of a exception, it would be really helpful to suggest that when using no-index, one also must provide the dependency in the location where one puts all the elements |
I've run into this issue also in a somewhat different, though presumably common, use-case. I'd like to run It's a bit of a high burden to require the project to be able to reach its configured index even when all dependencies are satisfied and it's already installed and the libs are cached. Is there something that a tool like |
Noting here that #7158 happened. We realized a few interesting things about PEP 440 and I came up with an idea to make that happen, in #7132 (comment). |
This is still an issue for me with
As you can see, it pins ray[serve]==1.10.0 https://github.com/kserve/kserve/blob/v0.9.0/python/kserve/requirements.txt Which is not yanked in pypi: https://pypi.org/project/ray/1.10.0/ Setting build-system.requires in pyproject.toml doesn't help:
|
If you use pip-tools, the exception is likely on them. Note that this issue is specifically about no matching distribution found for setuptools. Actually, I think this is no longer an open issue? |
Indeed. pip can't install your package's build tools if they're not available from any of the sources it's set up to use for that run. This means, So, your tractable options are:
This isn't something that pip can provide for you, sadly. It's the user's workflows that'll need to change to adapt for the way that build isolation works (and will work in the future, within pip). |
Description:
Since version 10 pip raises an exception during installation for some python packages.
Although the setuptools are installed.
With pip version 9 everything works fine.
What I've run:
One python package which fails with pip installation is dateutil.
The text was updated successfully, but these errors were encountered: