Skip to content

Commit 75fd327

Browse files
authored
fix: use python -m build in make publish, drop setup.py (#61)
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 75fd327

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ jobs:
4040

4141
- name: Test
4242
run: make test
43+
env:
44+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}

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)