Skip to content

fix: use python -m build in make publish, drop setup.py#61

Merged
skyrpex merged 2 commits into
masterfrom
fix-publish-makefile
Jul 21, 2026
Merged

fix: use python -m build in make publish, drop setup.py#61
skyrpex merged 2 commits into
masterfrom
fix-publish-makefile

Conversation

@skyrpex

@skyrpex skyrpex commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make publish used ./setup.py sdist, which produces a hyphenated sdist filename (localstack-client-X.Y.tar.gz); PyPI now enforces PEP 625 normalized filenames (underscore) and rejects the upload with a 400.
  • Switched to python -m build --sdist --wheel, which produces correctly named artifacts and also builds a wheel (previously only an sdist was published).
  • Removed setup.py (was just a setup() shim) and added a minimal pyproject.toml declaring the setuptools build backend, since python -m build needs one or the other present. setup.cfg still holds all package metadata, untouched.

Discovered this while publishing v2.12 — upload failed with:

400 Filename 'localstack-client-2.12.tar.gz' is invalid, should be 'localstack_client-2.12.tar.gz'.

Test plan

  • python -m build --sdist --wheel produces localstack_client-2.12.tar.gz + .whl with correct normalized names
  • twine check dist/* passes
  • make lint passes
  • make test passes (10/10, same as before this change)

skyrpex added 2 commits July 21, 2026 12:07
PyPI now rejects sdist filenames from the legacy `setup.py sdist`
path (hyphenated) since it enforces PEP 625 normalized names
(underscore). Switch to `python -m build`, which also produces a
wheel. setup.py was just a `setup()` shim; replaced with a minimal
pyproject.toml declaring the setuptools build backend.
Signed-off-by: Cristian Pallarés <cristian.pallares@localstack.cloud>
@skyrpex
skyrpex merged commit 75fd327 into master Jul 21, 2026
6 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