📦 Migrate packaging from setup.py to pyproject.toml#524
Merged
Conversation
Pure-metadata migration to PEP 621 with the setuptools backend:
- Version stays dynamic, read from bibtexparser.__init__.__version__
- License now a PEP 639 SPDX expression; deprecated license classifier dropped
- RELEASE doc: replace obsolete 'python setup.py sdist upload' with 'python -m build'
Wheel contents are byte-for-byte equivalent to the setup.py build.
Side-effect fix: README in package metadata is now read as UTF-8,
removing mojibake ('François') present in builds made on Windows.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
de3c925 to
cd4d6e2
Compare
Collaborator
Author
|
reviewed |
This was referenced Jun 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces
setup.pywith a PEP 621pyproject.toml, keeping the setuptools build backend. Pure-metadata migration — no build logic existed insetup.py.bibtexparser.__init__.__version__, so the release flow (bump version, tag, CI publishes) is unchangedlicense = "MIT"+license-files); the deprecatedLicense :: OSI Approved :: MIT Licenseclassifier is dropped accordinglypy.typed, both extras (test,docs), dependencies, and classifiers carried over 1:1RELEASEdoc updated:python setup.py sdist upload→python -m buildNo CI changes needed: the unittest workflow's
pip install -e .[test]and the publish workflow'spython -m buildboth work unchanged with the new config.Side-effect fix
setup.pyopenedREADME.mdwithout an encoding, so metadata built on Windows contained mojibake (François Boulognein the credits section on PyPI). PEP 621 mandates UTF-8 for the readme, so this is now rendered correctly.Verification
setup.pyas baseline, then with newpyproject.toml: wheel file lists are byte-for-byte identical; the METADATA diff contains only expected modernizations (Home-page→Project-URL, combinedAuthor-email, SPDX license)pip install -e .in a fresh venv works; package imports with correct version🤖 Generated with Claude Code