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

pkgs/sage-{docbuild,setup,sws2rst}: Migrate from setup.cfg to pyproject.toml #36562

Merged
merged 10 commits into from
Dec 6, 2023

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Oct 28, 2023

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

"Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
dependencies = ["sphinx"]
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@kiwifb kiwifb Oct 30, 2023

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

requires-python = ">=3.9, <3.12"
dependencies = [
"pkgconfig",
"jinja2",
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

@kiwifb kiwifb left a 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.

requires-python = ">=3.9, <3.12"
dependencies = [
"pkgconfig",
"jinja2",

This comment was marked as duplicate.

Copy link
Member

@kiwifb kiwifb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kiwifb
Copy link
Member

kiwifb commented Oct 30, 2023

Last comment that came to me after approving the other request. Should we add 3.12 in the list of supported python?

@kiwifb
Copy link
Member

kiwifb commented Oct 30, 2023

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 30, 2023

We should probably do that soon, but not in these PRs.

@kiwifb
Copy link
Member

kiwifb commented Oct 30, 2023

OK

Copy link
Member

@kiwifb kiwifb left a 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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 30, 2023

Thank you!

Copy link

Documentation preview for this PR (built with commit 784ecc8; changes) is ready! 🎉

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 23, 2023

@kiwifb OK to set to positive review after the last changes?

Copy link
Member

@kiwifb kiwifb left a 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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 23, 2023

Thank you!

vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 4, 2023
…`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
@vbraun vbraun merged commit e86721e into sagemath:develop Dec 6, 2023
26 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 6, 2023
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 10, 2023
    
<!-- ^^^^^
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 17, 2023
    
<!-- ^^^^^
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
@mkoeppe mkoeppe deleted the sage_sws2rst_pyproject_toml branch January 4, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants