Skip to content

📦 Migrate packaging from setup.py to pyproject.toml#524

Merged
MiWeiss merged 2 commits into
mainfrom
pyproject-migration
Jun 11, 2026
Merged

📦 Migrate packaging from setup.py to pyproject.toml#524
MiWeiss merged 2 commits into
mainfrom
pyproject-migration

Conversation

@MiWeiss

@MiWeiss MiWeiss commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replaces setup.py with a PEP 621 pyproject.toml, keeping the setuptools build backend. Pure-metadata migration — no build logic existed in setup.py.

  • Version stays dynamic, read from bibtexparser.__init__.__version__, so the release flow (bump version, tag, CI publishes) is unchanged
  • License is now a PEP 639 SPDX expression (license = "MIT" + license-files); the deprecated License :: OSI Approved :: MIT License classifier is dropped accordingly
  • py.typed, both extras (test, docs), dependencies, and classifiers carried over 1:1
  • RELEASE doc updated: python setup.py sdist uploadpython -m build

No CI changes needed: the unittest workflow's pip install -e .[test] and the publish workflow's python -m build both work unchanged with the new config.

Side-effect fix

setup.py opened README.md without an encoding, so metadata built on Windows contained mojibake (François Boulogne in the credits section on PyPI). PEP 621 mandates UTF-8 for the readme, so this is now rendered correctly.

Verification

  • Built sdist + wheel with old setup.py as baseline, then with new pyproject.toml: wheel file lists are byte-for-byte identical; the METADATA diff contains only expected modernizations (Home-pageProject-URL, combined Author-email, SPDX license)
  • pip install -e . in a fresh venv works; package imports with correct version
  • Full test suite passes: 2472 passed, 12 skipped

🤖 Generated with Claude Code

MiWeiss and others added 2 commits June 11, 2026 23:31
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>
@MiWeiss MiWeiss force-pushed the pyproject-migration branch from de3c925 to cd4d6e2 Compare June 11, 2026 21:31
@MiWeiss

MiWeiss commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

reviewed

@MiWeiss MiWeiss merged commit 998a8f4 into main Jun 11, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant