-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
Explain oldest-supported-numpy #1778
Comments
|
Maybe we should consider making an alias package, name it |
Maybe a linter rule in conda-smithy would be better if |
Yes, definitely. The alias package idea is really a bad hack. It's just that we already have whatever |
I actually think the wrapper (or an empty package that just tells pip |
why not adapt your build script to completely remove pyproject.toml |
I've started doing that, but it's still a bandaid IMO. More and more functionality ecosystem-wide is moving into pyproject.toml (e.g. scipy starting to require meson to build), so it would be nice to be able to install packages out-of-the box (as in the staged-recipes example-package) just by providing the right dependencies. |
Longer term I think we should start using |
For now, we can just add it to the matching as a new quirk: https://github.com/conda-incubator/grayskull/blob/main/grayskull/strategy/config.yaml |
Because that would be like removing setup.cfg / setup.py when they specify oldest-supported-numpy in pip cannot install anything unless it either:
Depending on the build backend, it may be possible to run that directly instead. e.g. |
I think this is somewhat overblown. Much of the dependencies are rewritten in the meta file. Pyproject.toml may help in a pypi context, but in a conda forge centric context, it somewhat duplicates alot of the effort of the CIs and docker. Maybe I'm not so versed in the more recent additions to pyproject.toml, but i recall it was made to help declare build time dependencies, as such, this is duplicated in the meta file, and can likely safely be removed, or replaced by a shim for conda-forge purposes. |
There's a new PEP that says that the meta file is now pyproject.toml, in the There's (experimental?) support for "no setup.cfg, just pyproject.toml" in setuptools. Flit and poetry never use anything else. Meson-python (used by e.g. SciPy) never uses anything else. Other build backends will follow if they haven't already. So yes, that file is now a hard requirement a lot of the time. EDIT: see https://peps.python.org/pep-0621/ |
That's my understanding too. Well, at least in the "recommended" setup (i.e. using setup.cfg AND pyproject.toml instead of setup.py). I am rather inexperienced in this area, so I have no idea if "recommended" is legit or I just happen to remember it this way.
I think you're correct about the build time thing, but the larger problem is that newer projects may simply fail if pyproject.toml is deleted (not that it is actually of any use in conda-forge). For example, if a package uses setup.cfg, then it must also include pyproject.toml; so if we delete pyproject.toml and run
(example implementation: conda-forge/particula-feedstock#13) |
Just to add: I have seen some projects now that only have a pyproject.toml so removing is not an option anymore. |
Ok. It seems to have evolved to be more than just build system declaration. Does pip have a flag to ignore the build system stuff? Does the |
No, but even if it did, the problem is now more complicated anyway, I just wanted to give you a minimal live example of it failing. |
Here is one with only pyproject.toml: conda-forge/staged-recipes#19364 (btw, pls merge it if you can, thanks!) |
I'm sorry, that project doesn't actually have any required dependencies nor does it use oldest-supported-numpy. |
Where should the content be added?
FAQ
What should be added?
NumPy introduced oldest-supported-numpy: https://github.com/scipy/oldest-supported-numpy
This can be used by packages instead of specifying a NumPy range when building.
The package doesn't exist in conda-forge and instead numpy should be used without any versions specified.
Additional information
https://gitter.im/conda-forge/conda-forge.github.io?at=62a8fc44deea5616bbf9b99c
The text was updated successfully, but these errors were encountered: