From eeb3a228e22f05a68063643d0088f205d74aa9d0 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 3 May 2023 13:48:55 +1000 Subject: [PATCH 1/4] Specify build backend --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4112bd1..fc9e370 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + [tool.black] line-length = 88 target-version = ['py36', 'py37', 'py38', 'py39', 'py310', 'py310'] From 3c35f8fa9fb45356b86c50c7e62f67284201df02 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 3 May 2023 14:07:21 +1000 Subject: [PATCH 2/4] Remove 'setuptools' dep in contributing docs --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ec0fb4..59afca1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ To create a development environment and install the development dependencies, ru ```bash python3 -m venv venv . venv/bin/activate -pip install --upgrade pip setuptools +pip install --upgrade pip pip install '.[dev]' pre-commit install --install-hooks ``` From fc288d9ae42b5a0f0801f86e4551b521fdf66745 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 3 May 2023 14:10:24 +1000 Subject: [PATCH 3/4] Build package with 'build' in CI --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f96b7e4..cb60226 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,11 +19,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install build twine - name: Build and publish env: TWINE_USERNAME: "__token__" TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | - python setup.py sdist bdist_wheel + python -m build --outdir dist . twine upload dist/* From f17d54bf2b92fc59068a978fa80ae0f0be988ccf Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 3 May 2023 14:18:20 +1000 Subject: [PATCH 4/4] Drop setuptools version pin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc9e370..0745f79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools >= 61.0"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black]