-
-
Notifications
You must be signed in to change notification settings - Fork 166
Use setuptools.dynamic.optional-dependencies feature #481
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
Conversation
I haven't really followed closely recently, but that mechanism doesn't look ideal, and this PR will go further down such a path it looks like to me. Dependencies for a simple pure Python package like this one really should be declared statically. Static analysis tools (e.g. what powers the GitHub dependency analysis, https://libraries.io/ or recipe translators for other packaging ecosystems like grayskull) can understand So my preference would be to not do any of this and simply use a regular |
My preference would be to do-away with most Are there still needs to have separate requirements files? If no, then it would be much simpler to maintain the optional dependencies in Xref #474 which introduced the |
At this point, there's still no equivalent to |
I agree with the PEP 621 part in particular, yes. I don't feel strongly about requirements files either way - if others have a need for them, it's very little effort to keep them around for the time being.
True. That is fine with me. Then let's just keep duplicate dependencies in |
+1 for living with some duplication for now |
Thanks for the feedback! Here is an alternative proposal that I think will suite everyone is:
This proposal will keep the requirements files in-sync with a primary pyproject.toml file without the need of any template. |
That'd work; it's probably a better direction to sync in than we do currently. @jarrodmillman if that works, we can do it for skimage as well. |
Superseded by #483 |
This PR leverages built-in features from setuptools>=62.6 (pypa/setuptools@3b86141) and documented here which allows 'optional-dependencies' to be dynamic by reading files. This feature is marked as "BETA", probably because the current limitation is that it does not allow a mixture of dynamic and non-dynamic optional-dependencies to be specified.
This replaces the need for
tools/generate_pyproject.toml.py
and associated template file.