-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
pkgs/sage-{docbuild,setup,sws2rst}
: Migrate from setup.cfg
to pyproject.toml
#36562
Conversation
"Topic :: Scientific/Engineering :: Mathematics", | ||
] | ||
urls = {Homepage = "https://www.sagemath.org"} | ||
dependencies = ["sphinx"] |
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.
Doesn't sage_docbuild also depend on jupyter-sphinx?
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.
I think we are treating the dependencies on Sphinx extensions (declared in sage_docbuild/conf.py) as belonging to sagemath_doc_html
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.
I understand the logic but I am not very comfortable with it. Part of me feels that if you are going that route, sphinx should be treated the same way. It is not needed at install either, I think.
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.
A difference is that sphinx is imported by sage_docbuild.sphinxbuild
.
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.
I do not think I will argue with that one. Where to declare runtime dependency seems to be a bit unsettled.
pkgs/sage-setup/pyproject.toml
Outdated
requires-python = ">=3.9, <3.12" | ||
dependencies = [ | ||
"pkgconfig", | ||
"jinja2", |
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.
What about cython? I believe both jinja2 and cython are runtime dependencies.
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.
The distributions that use Cython declare that in their build-system requires. I don't think we need it here.
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.
That's an argument for distribution to declare their use of jinja2 as well. And there is actually no call to pkgconfig in sage_setup.
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.
Probably jinja2 should actually be an optional dependency (formerly known as extras-require) because only the packages that you sage_setup.autogen use it.
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.
Good point about pkgconfig.
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
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.
After modularization, there will be more uses, but I've made the change now.
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.
Hit the wrong button, this is not an extra review task.
pkgs/sage-setup/pyproject.toml
Outdated
requires-python = ">=3.9, <3.12" | ||
dependencies = [ | ||
"pkgconfig", | ||
"jinja2", |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
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.
LGTM
Last comment that came to me after approving the other request. Should we add 3.12 in the list of supported python? |
And I meant to post that in #36563 |
We should probably do that soon, but not in these PRs. |
OK |
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.
Let's get going.
Thank you! |
…o build-system requires
…o build-system requires
Documentation preview for this PR (built with commit 784ecc8; changes) is ready! 🎉 |
@kiwifb OK to set to positive review after the last changes? |
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.
Let's ship it.
Thank you! |
…`setup.cfg` to `pyproject.toml` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> - Split out from and part of sagemath#33577 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36562 Reported by: Matthias Köppe Reviewer(s): François Bissey, Matthias Köppe
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> This modernization eliminates some deprecation warnings during installation. It may help solve the problem of the disappearing sage- conf (https://groups.google.com/g/sage- release/c/J6mGYH56FKA/m/m9yHivCWAgAJ, https://groups.google.com/g/sage- release/c/dvPti2UkyjQ/m/2jeUZROzAwAJ, https://groups.google.com/g/sage- release/c/DeqhtAgi2es/m/DYq13owvAQAJ). No change to how sagelib is installed; this will be taken care of separately (sagemath#34209). In combination with sagemath#36562, which adds `pyproject.toml` for sage- docbuild, sage-setup, sage-sws2rst, also these distributions are switched to the modern editable install. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36751 Reported by: Matthias Köppe Reviewer(s): John H. Palmieri
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> This modernization eliminates some deprecation warnings during installation. It may help solve the problem of the disappearing sage- conf (https://groups.google.com/g/sage- release/c/J6mGYH56FKA/m/m9yHivCWAgAJ, https://groups.google.com/g/sage- release/c/dvPti2UkyjQ/m/2jeUZROzAwAJ, https://groups.google.com/g/sage- release/c/DeqhtAgi2es/m/DYq13owvAQAJ). No change to how sagelib is installed; this will be taken care of separately (sagemath#34209). In combination with sagemath#36562, which adds `pyproject.toml` for sage- docbuild, sage-setup, sage-sws2rst, also these distributions are switched to the modern editable install. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36751 Reported by: Matthias Köppe Reviewer(s): John H. Palmieri
📝 Checklist
⌛ Dependencies