Skip to content

Bump to setuptools>=80 and setuptools-scm>=9.2 - #4910

Merged
seisman merged 2 commits into
mainfrom
pyproject
Sep 22, 2026
Merged

seisman merged 2 commits into
mainfrom
pyproject

Conversation

@seisman

@seisman seisman commented Sep 22, 2026

Copy link
Copy Markdown
Member

Bump setuptools and setuptools-scm following the official recommendations of setuptools-scm (https://setuptools-scm.readthedocs.io/latest/usage/#simplified-activation-new).

@seisman seisman added this to the 0.20.0 milestone Sep 22, 2026
@seisman
seisman requested a review from weiji14 September 22, 2026 00:39
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Sep 22, 2026
Comment thread pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=77", "setuptools_scm[toml]>=6.2"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

setuptools-scm[toml] is changed to setuptools-scm[simple].

toml is no longer needed because setuptools-scm started to use the built-in tomllib library since 2022 (pypa/setuptools-scm#740)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

setuptools-scm[toml] is changed to setuptools-scm[simple].

I don't think we're supposed use simple since we're using a custom version scheme in [tool.setuptools_scm]? At least that's what I'm inferring from the docs at https://setuptools-scm.readthedocs.io/v9.2.2/usage/#simplified-activation-new:

image

So maybe remove the [simple]?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've removed [simple] and it still works.

From what I understand, [simple] is meant for use cases with minimal configuration (e.g.,, no [tool.setuptools_scm] section).

See the "Legacy simplified activation (removed in 9.2.0)" box at https://setuptools-scm.readthedocs.io/latest/usage/#using-setuppy-to-pass-code

Comment thread pyproject.toml Outdated
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=77", "setuptools_scm[toml]>=6.2"]
requires = ["setuptools>=80", "setuptools-scm[simple]>=9.2"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we bump to setuptools-scm>=10.0.4 to enable pre_parse = "fetch_on_shallow" mentioned in #4909?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Probably, still need to test if pre_parse = "fetch_on_shallow" works as expected.

Another concern is that setuptools-scm 10.0.4 was released in March, 2026, which is quite new.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, let's just do a simple bump to setuptools-scm>=9.2 here, and then try >=10.0.4 in #4909. 6 months isn't too bad, at least this isn't a user-facing dependency so we don't need to wait for a year or something.

@weiji14

weiji14 commented Sep 22, 2026

Copy link
Copy Markdown
Member

Btw, I've manually triggered CI at https://github.com/GenericMappingTools/pygmt/actions/runs/35690233375 to check that things work ok.

@seisman
seisman merged commit c13e8c9 into main Sep 22, 2026
18 checks passed
@seisman
seisman deleted the pyproject branch September 22, 2026 05:26
@seisman seisman removed the needs review This PR has higher priority and needs review. label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants