Skip to content

pip package & publishing to PYPI - #41

Draft
Bomme wants to merge 6 commits into
masterfrom
pip_package
Draft

Bomme wants to merge 6 commits into
masterfrom
pip_package

Conversation

@Bomme

@Bomme Bomme commented Nov 2, 2025 •

Copy link
Copy Markdown
Contributor

Packaging and CI setup for the project, transitioning from setup.py to a PEP 621-compliant pyproject.toml, using uv as front-end and hatchling as build backend.

Packaging and Publishing Improvements:

  • Added a pyproject.toml file with project metadata, dependencies, build system configuration, and support for Python 3.9–3.14, enabling modern packaging standards and future PyPI publishing.
  • The package name would be freesound
  • Removed the legacy setup.py file, fully switching to the new build system.
  • Added a GitHub Actions workflow (.github/workflows/publish.yml) for automated building and publishing of releases to PyPI.

Continuous Integration Updates:

  • Updated the smoke test workflow to use a matrix strategy for Python 3.9–3.14, replaced pip with uv for dependency management and running tests, and improved reliability with fail-fast.
  • Added .python-version file specifying Python 3.13 for local development environment consistency.

Before releasing

  • Create the freesound project (or a pending trusted publisher) on PyPI and a pypi environment on GitHub.
  • Decide the release version (pyproject.toml still says 1.1)

@Bomme
Bomme requested review from alastair and ffont November 2, 2025 20:15
@Bomme
Bomme force-pushed the pip_package branch 2 times, most recently from dc1c652 to 96c976b Compare October 22, 2026 18:36
Bomme added 6 commits October 22, 2026 20:43
- Updated pyproject.toml with project metadata, dependencies, and build system configuration.
- Removed setup.py as it is no longer needed with the new configuration.
- Modified GitHub Actions workflow to support multiple Python versions and updated installation steps.
python 3.7 is no longer supported in ubuntu-latest
- Require Python >=3.9 and update classifiers (3.9-3.14)
- Use SPDX license expression (MIT) with license-files; require hatchling >=1.27
- Add Issues/Documentation URLs and a dev dependency group
- publish workflow: bump retired upload/download-artifact@v3 to v5 and drop
  redundant setup-python step
- smoke test workflow: test 3.9-3.14 on ubuntu-latest using setup-uv
Run examples.py live on every supported Python (3.9-3.14), one version at a
time with a 30s pause before each run, to stay under Freesound's throttling
(60 requests/minute). Also check that the package imports and builds in each job.
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