-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
📝 Switch packaging metadata to use PEP 621 #690
Conversation
Note, I'm not planning on re-writing the commit messages. Feel free to re-write them to satisfy the linter. |
@jaraco the CI check is mostly indicative, which is why I didn't mark it as a blocker in the branch protection configuration. I'm thinking of how to improve it making it more useful. In case of obviously bad messages, I sometimes opt for using the squash "merge" but most of the time, using the regular natural merge is fine. Anyway, this PR has a more serious problem — it breaks the CI fully and it aborts very early, failing to produce dists with expected names and version: https://github.com/cherrypy/cheroot/actions/runs/8744542826/job/23997691523?pr=690#step:15:41 I suspect this is because the pinned |
Could you include some reasoning on PEP 621 vs. Also, the PR title suggests that it's about PEP 621 but it seems like this PR goes beyond that by also moving other things like |
@jaraco I forgot to mention that I finally integrated Towncrier in Cheroot, with some extra categories compared to what you're used to: https://cheroot.cherrypy.dev/en/latest/contributing/guidelines/#alright-so-how-do-i-add-a-news-fragment. We'll need to add a |
PEP 621 only defines the metadata bits, but Setuptools' implementation of it includes support for loading from pyproject.toml. I'm not sure if it's possible to keep separate configs. It probably is. After 3e4ed4f, however, there aren't any settings left that are setuptools-specific. I don't have any objections to keeping some config in setup.cfg. You're welcome to do that if/as needed. |
I thought I did have objections initially, but I think I don't actually have a strong case in support of that anymore. I'd keep other tooling separate where possible. |
I'll try to address that final bit that blocks the CI... |
I just realize that there's another forgotten file that is still present in the repo — |
Alright.. dist build job now works. But I'll postpone merging until I figure out the Sphinx problem that is unrelated. |
0f9ff8d
to
36825b2
Compare
36825b2
to
1a97820
Compare
I addressed this too. |
1a97820
to
2998881
Compare
It's added to the `packaging` category as the downstreams are the ones that would care about this happening most.
2998881
to
3a1bb15
Compare
It's added to the `packaging` category as the downstreams are the ones that would care about this happening most.
3a1bb15
to
3ddeabd
Compare
It's added to the `packaging` category as the downstreams are the ones that would care about this happening most.
3ddeabd
to
9027750
Compare
Another error noticed in the CI: intersphinx inventory 'https://cherrypy.rtfd.io/en/latest' not readable due to ValueError: unknown or unsupported inventory version: ValueError('invalid inventory header: ')
/home/runner/work/cheroot/cheroot/.tox/build-docs/bin/python: can't open file '/home/runner/work/cheroot/cheroot/docs/../setup.py': [Errno 2] No such file or directory
Extension error (jaraco.packaging.sphinx):
Handler <function load_config_from_setup at 0x7f355768e3b0> for event 'builder-inited' threw an exception (exception: Command '['/home/runner/work/cheroot/cheroot/.tox/build-docs/bin/python', '/home/runner/work/cheroot/cheroot/docs/../setup.py', '--name', '--version', '--url', '--author']' returned non-zero exit status 2.) Perhaps one of the non-bumped extensions ( |
Seems likely. jaraco.packaging.sphinx 9 added this change. |
Yeah, I bumped it locally a few hours ago but then stepped away from the computer and only committing it now. |
Meanwhile, I'll focus on remaking the |
It's added to the `packaging` category as the downstreams are the ones that would care about this happening most.
de833c1
to
121d9a8
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #690 +/- ##
==========================================
+ Coverage 78.52% 83.66% +5.14%
==========================================
Files 27 28 +1
Lines 4111 4169 +58
==========================================
+ Hits 3228 3488 +260
+ Misses 883 681 -202 |
It's added to the `packaging` category as the downstreams are the ones that would care about this happening most.
121d9a8
to
004ed66
Compare
That was caused by a Sphinx upgrade that happened because I didn't make a lockfile for that env. So I made it now with a lower Sphinx version to make the CI happy, but will patch the local extension with the necessary later which will allow upgrading. |
This patch migrated most related content to `pyproject.toml` semi-automatically. The change was produced by using `jaraco.develop.migrate-config` and `ini2toml`. As a part of this change previously used for packaging configuration `setup.cfg` and `setup.py` files have been removed. `setup.py` hasn't been needed for quite a while but kept for backward compatibility. We don't care about that anymore. Co-authored-by: Sviatoslav Sydorenko <[email protected]>
This is apparently necessary since the older versions of `jaraco.packaging.sphinx` call `setup.py` directly which is deprecated and is being removed.
004ed66
to
0b75287
Compare
This change is