Skip to content

Commit 590a160

Browse files
committed
fix: use python -m build in make publish, drop setup.py
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.
1 parent 4bee152 commit 590a160

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ install: ## Install dependencies in local virtualenv folder
1414

1515
publish: ## Publish the library to the central PyPi repository
1616
# build and upload archive
17-
$(VENV_RUN); ./setup.py sdist && twine upload $(BUILD_DIR)/*.tar.gz
17+
rm -rf $(BUILD_DIR)
18+
$(VENV_RUN); $(PIP_CMD) install --upgrade build twine && \
19+
python -m build --sdist --wheel && \
20+
twine upload $(BUILD_DIR)/*
1821

1922
test: ## Run automated tests
2023
($(VENV_RUN); test `which localstack` || pip install .[test]) && \

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)