Background
Chirp currently ships as a Windows EXE built with PyInstaller (dist/Chirp.exe) and as a cloned-repo installation (pip install -r requirements.txt && python -m chirp). Neither is great for:
- Python users on Linux/macOS who want the app via their usual toolchain.
- Scripted/remote deployments where
pip install chirp-audio (or similar) is the obvious incantation.
- Reusing Chirp's DSP/trigger modules as a library in other projects — currently requires a git submodule or manual PYTHONPATH.
Aim
Publish Chirp as a standard installable Python package so pip install chirp-recorder (name TBD — chirp is taken on PyPI) gets you a working chirp CLI entry point and importable modules.
Proposed Implementation
Package metadata
- Add
pyproject.toml with PEP 621 metadata (project name, version driven from chirp.__version__, description, license, Python requirement, authors).
- Use
setuptools or hatchling as the build backend — hatchling is lighter and handles version-from-file cleanly.
- Move install requirements from
requirements.txt into [project.dependencies]. Keep requirements.txt as a dev/pinned-versions file for developers.
- Entry point:
[project.scripts] chirp = "chirp.main:main" so pip install gives a chirp command in PATH.
- Include
manual.html as package data.
PyPI name
chirp is already taken. Candidate names:
chirp-recorder
chirp-audio
chirp-trigger
bioacoustic-chirp
Pick one and reserve it on TestPyPI first.
Build + publish
- Add
build/twine as dev dependencies.
- GitHub Actions workflow: on tag push (
v*), build sdist + wheel, upload to PyPI via pypa/gh-action-pypi-publish. Use trusted publishing (OIDC) rather than API tokens.
- Test installation on Linux, macOS, and Windows via the workflow before publishing.
PyInstaller compatibility
- Keep
chirp.py shim at the repo root so dist/Chirp.exe still builds the same way.
- Verify PyInstaller picks up the package correctly when installed from wheel.
Docs
- README section: "Install from PyPI" with the one-line
pip install … command.
- Link to the manual; mention conda env name is optional (not required post-pip-install).
Tests
- Add a workflow step that does
pip install -e . and then runs pytest tests/ -q — confirms the package layout is valid for editable installs.
- Smoke-test: after install,
chirp --version prints the right version and python -c "import chirp; print(chirp.__version__)" works.
Notes
Low-risk, mostly plumbing, but high-value for distribution. The post-Phase-1 package layout (chirp/ with subpackages) is already pip-friendly — the work is mostly metadata and CI.
Background
Chirp currently ships as a Windows EXE built with PyInstaller (
dist/Chirp.exe) and as a cloned-repo installation (pip install -r requirements.txt && python -m chirp). Neither is great for:pip install chirp-audio(or similar) is the obvious incantation.Aim
Publish Chirp as a standard installable Python package so
pip install chirp-recorder(name TBD —chirpis taken on PyPI) gets you a workingchirpCLI entry point and importable modules.Proposed Implementation
Package metadata
pyproject.tomlwith PEP 621 metadata (project name, version driven fromchirp.__version__, description, license, Python requirement, authors).setuptoolsorhatchlingas the build backend — hatchling is lighter and handles version-from-file cleanly.requirements.txtinto[project.dependencies]. Keeprequirements.txtas a dev/pinned-versions file for developers.[project.scripts] chirp = "chirp.main:main"sopip installgives achirpcommand in PATH.manual.htmlas package data.PyPI name
chirpis already taken. Candidate names:chirp-recorderchirp-audiochirp-triggerbioacoustic-chirpPick one and reserve it on TestPyPI first.
Build + publish
build/twineas dev dependencies.v*), build sdist + wheel, upload to PyPI viapypa/gh-action-pypi-publish. Use trusted publishing (OIDC) rather than API tokens.PyInstaller compatibility
chirp.pyshim at the repo root sodist/Chirp.exestill builds the same way.Docs
pip install …command.Tests
pip install -e .and then runspytest tests/ -q— confirms the package layout is valid for editable installs.chirp --versionprints the right version andpython -c "import chirp; print(chirp.__version__)"works.Notes
Low-risk, mostly plumbing, but high-value for distribution. The post-Phase-1 package layout (
chirp/with subpackages) is already pip-friendly — the work is mostly metadata and CI.