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

Move metadata from src/setup.cfg.m4 to src/pyproject.toml #38714

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Sep 26, 2024

Goal of the PR:

  • Modernize metadata of sagemath-standard by getting rid of the setup.cfg in favor of pyproject.toml.

Status quo:

  • The runtime dependencies of the Sage library are declared in src/setup.cfg.m4; at bootstrapping time, src/setup.cfg is generated, and the version constraints obtained via sage-get-system-packages install-requires are substituted.
  • These version constraints for most packages come directly from source files build/pkgs/*/version_requirements.txt (these files until not long ago were called install-requires.txt).
  • For the runtime dependencies that happen to also be build dependencies of sagelib, after @tobiasdiez's Make pyproject.toml the source for build dependencies #36982, which was "making src/pyproject.toml the single source of truth", these build/pkgs/*/version_requirements.txt files are not source files but are generated at bootstrap time. The lists of these special packages appear 1x in .gitignore, 1x in Makefile, 2x in bootstrap.
  • Reading the information from the src/pyproject.toml file is done by the script build/bin/sage-get-system-packages install-requires[-toml].

Scope and implementation strategy of the PR:

  • Get rid of the quadrupled explicit list of special packages, a maintenance burden that already caused breakage (sagemath-standard: some fixes in build dependencies #37894 (comment)), by making all version_requirements.txt files source files again; for the special packages, without actual version information.
  • Generalize build/bin/sage-get-system-packages install-requires[-toml] so as to read not only from the build requirements but also from the runtime dependencies now declared in src/pyproject.toml.
  • Move version constraints for the packages that are runtime dependencies to src/pyproject.toml, leave behind build/pkgs/*/version_requirements.txt files without version constraints.
  • Move the other metadata to src/pyproject.toml.
  • Update the documentation.

Outside of the scope of this PR:

  • Everything else.

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

@mkoeppe mkoeppe added the disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ label Sep 26, 2024
@mkoeppe mkoeppe self-assigned this Sep 26, 2024
Copy link

github-actions bot commented Sep 26, 2024

Documentation preview for this PR (built with commit 584508d; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

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

OK. I don't see change in contents.

@kwankyu
Copy link
Collaborator

kwankyu commented Sep 26, 2024

+1 from me.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2024

The predecessor PR #37902 was set to "disputed" 3 weeks ago.

@mkoeppe mkoeppe added this to the sage-10.5 milestone Sep 26, 2024
@NathanDunfield
Copy link
Contributor

+1 from me too. Vote count is now:

In favor: @mkoeppe (PR author), @kwankyu, @NathanDunfield
Against @dimpase, @tobiasdiez

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 28, 2024

@tobiasdiez put a subset of the changes here on #38727.

I have set that to "needs work" because the cherry-picked subset duplicates the version constraints, violating our long-standing policy of single-sourcing version constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ s: needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants