Skip to content

Use pyproject.toml for packaging (PEP 621) - #13

Open
endolith wants to merge 2 commits into
masterfrom
cursor/pyproject-packaging-2589
Open

endolith wants to merge 2 commits into
masterfrom
cursor/pyproject-packaging-2589

Conversation

@endolith

@endolith endolith commented May 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Consolidates former PRs #9 and #13 into a single packaging-only change on master (no midi_play.py rewrite or MIDI docs).

  • pyproject.toml: PEP 621 metadata; Hatchling build backend; requires-python = ">=3.10" aligned with current Hatchling and CI
  • Optional extras: test, dev (pytest, pytest-cov, flake8), midi (numpy, pygame for current midi_play.py)
  • Wheel / sdist: single-module wheel; sdist includes tests, demo script, and CI config
  • pytest config moved from pytest.ini into pyproject.toml
  • Removed: setup.py, requirements.txt, pytest.ini
  • CI: Python 3.10–3.13; actions/checkout@v4, actions/setup-python@v5, codecov/codecov-action@v5; pip install -e ".[dev]" then flake8 + pytest
  • PyPI publish: publish.yml workflow (from elsim) builds on v* tags and publishes via Trusted Publishing (OIDC)

CI infrastructure

Master now drops Python 3.7 (unavailable on Ubuntu 24.04) and bumps deprecated actions. All six cursor PR branches were rebased onto the fixed master.

Verification

  • pip install -e ".[dev]" + pytest — 21 passed (Python 3.12 locally)
  • flake8 — no syntax/undefined-name errors
  • python -m build — wheel and sdist build successfully
Open in Web Open in Cursor 

Consolidates former PRs #9 and #13 into a single packaging-only change on
master (no midi_play rewrite or docs).

- Add pyproject.toml with Hatchling backend, optional dev/test/midi extras
- Move pytest config from pytest.ini into pyproject.toml
- Remove setup.py and requirements.txt
- CI: Python 3.10–3.13, editable .[dev] install, updated actions
- README: installation instructions for editable, dev, and midi extras

Co-authored-by: endolith <endolith@gmail.com>
Copy trusted-publishing pattern from endolith/elsim: build wheel/sdist on
v* tags, then publish to PyPI via OIDC. Include publish.yml in sdist and
fix README Actions badge to use workflow file path.

Co-authored-by: endolith <endolith@gmail.com>
@cursor
cursor Bot marked this pull request as ready for review June 12, 2026 23:49

This branch has not been deployed

No deployments
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.

2 participants