-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
autodetect setuptools/missing pyproject.toml plus many overrides #1711
Conversation
At the very least this is going to identify a bunch of overrides for non-existing packages in the overrides file. |
So, building the 8241 packages that had 'setuptools*' annotations in build-systems.
A cursory glance suggests that might be because some of those ~176 packages had upstream packages that were missing the setuptools annotation. Looking at the top 15 reasons why packages still fail:
|
I build the 8000 most downloaded packages from pypi, here are the stats: total 8000 (this is after reintroducing a few setuptools-scm buildSystems). The failure is in xtcocotools, where pip tries to download python-dateutils, and I currently have no idea why whatsoever. That's not in that packages source... I'm aware that there are 4 packages unaccounted for. I'll investigate in the morning. |
9915f1a
to
3bf91fb
Compare
@TyberiusPrime Friendly ping for this PR. Is the expectation that you'll get existing CI to pass? |
Absolutely, this must pass the existing CI, and not loose a single package that was building previously. It has turned into a bit of quest and mania. I have defined a python package set with from
Each of which I stick into a flake whose pyproject.toml just requests that one package. After some 'poetry doesn't generate a lock file' losses later, Or more like fails to build 59%, or exactly 9999 packages :(. With the setuptools auto-detection and a ton of override-tuning, I'll push again in a minute, to see if I'm making the CI happy, Let me know how you want this structured, PS: I guess poetry does select very different versions depending on what package I request. |
It just occurred to me that if we have to download and check for pyproject.toml anyway, we might as well open it up and read the build systems if present. |
bd538e1
to
2de9144
Compare
2de9144
to
e514817
Compare
Ok, I got the CI to run just one job locally. This should allow me to get the last 7 failing CI test fixed. |
Has pyproject.toml but no build-sytem information therein.
Lol, that CI setup is messing with me. a 4+hour long job, and I can't even get the log of the job that failed after 2h because the log is too long and github says 'wait till they're all done, then download the log'. (it was scipy. Here's to hoping this finishes now). |
yeah, the CI passes :) All right, @cpcloud, I'm ready to move this from 'work in progress' to 'please judge this puppy, thank you'. I can squash the CI-induced commits down if you want, but I didn't want to trigger another 4.5h CI run. I still think we can extend this, in combination with the existing auto-detection for 'local' packages, to cover more than just setuptools/(no pyproject.toml) auto detection, but for now, I think we should strive to land this just for the sheer amount of building packages gained. That is if there's no fundamental issue with digging around in the $src to get our buildInputs that I'm missing. |
srcRoot + "/${source.subdirectory}" | ||
else | ||
srcRoot; | ||
missing_pypproject_toml = ! builtins.pathExists "${src}/pyproject.toml"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is IFD (import-from-derivation), and not permitted in restricted eval.
This would break poetry2nix for such setups (e.g. users of Hydra).
As well as just being terrible for eval performance:
https://fzakaria.com/2020/10/20/nix-parallelism-import-from-derivation.html
Fair enough @adisbladis , I had misunderstand the importance of the 'import' part of import-from-derivation.Nix-eval being single threaded & blocking is :(. This leaves me seeing only two ways forward to increase the set of pypi packages poetry2nix can build, without burdening the users:
No 2. would save a ton of overrides, at the cost rebuilding when any build-system changes. I guess a third option would be to provide a tool that finds out the necessary build-systems given a pyproject.toml and a poetry.nix, but that's just a tad less user hostile than the current 'and then you need to figure out overrides' approach. Either way, I'll readd the setuptools overrides for now (and add the new ones that the 17k package set needs), and resubmit as a new PR if that's cool?. |
Oops, the cargo stuff is also IDF. All right, then it's option 1 & 3 together, I suppose. |
With more and more "magic" happening under the hood it would great to address #1730 and support a user to get some tracing insights e.g. for debugging which package was added in what phase(?). |
This is an attempt to get rid of the thousands of setuptools overrides, by detecting if there is no pyproject.toml present in the source.
shall tackle #1591 and #771
but I'm not convinced it's doable yet.
I'll try to build 'em all, and in parallel see what the CI says to this hack.