Skip to content
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

Consider populating optional-dependencies in pyproject.toml #24670

Open
rgommers opened this issue Sep 8, 2023 · 3 comments
Open

Consider populating optional-dependencies in pyproject.toml #24670

rgommers opened this issue Sep 8, 2023 · 3 comments

Comments

@rgommers
Copy link
Member

rgommers commented Sep 8, 2023

This follows up on this comment from @skirpichev: #23808 (comment) about f2py -c needing meson and ninja for Python 3.12 (or with --backend=meson on older Python versions).

Right now we do not use optional-dependencies at all. It is also the future replacement for test_requirements.txt & co. Here is an example of how it can be used: https://github.com/scipy/scipy/blob/9f7549abcc61f5dc72ca000cef7bc43066c74527/pyproject.toml#L74-L109

In numpy it could have an extra f2py section, and that would allow installing the needed dependencies with pip install numpy[f2py]. Of course you have to know that that's possible, and at that point you can equally well do pip install meson ninja , so this isn't all that urgent. An extra complication is that ninja is a system dependency, and using it from PyPI is a bit hacky. That's for example why meson and meson-python do not have a direct dependency on ninja; meson-python first checks if it's installed on the system and dynamically adds it in non-isolated installs if it's missing.

I'd say we don't want to do this for 1.26.0, but we can consider populating the optional dependencies table for 2.0.

@rgommers
Copy link
Member Author

I'm bumping this to the next release cycle, because I don't want to touch optional dependencies right before creating a release branch, and this isn't blocking/important for 2.0

@charris charris modified the milestones: 2.1.0 release, 2.2.0 release Aug 1, 2024
@mattip
Copy link
Member

mattip commented Aug 7, 2024

This would be good to do, it would require some knowledge of packaging and maybe meson.

@mattip
Copy link
Member

mattip commented Aug 21, 2024

We discussed this a triage meeting and decided to remove it from the milestone, but it would be nice to have this, as well as #26289 to ship tests separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants