From cef5dca6dc548ad83db810ffec1e5b7b82f9388c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 3 Sep 2020 10:24:23 -0400 Subject: [PATCH 1/2] Support and use and document pep517.build --- {{cookiecutter.project_slug}}/CHEATSHEET.rst | 2 +- {{cookiecutter.project_slug}}/ci.sh | 4 ++-- {{cookiecutter.project_slug}}/pyproject.toml | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/CHEATSHEET.rst b/{{cookiecutter.project_slug}}/CHEATSHEET.rst index f95854f..d6a6f6b 100644 --- a/{{cookiecutter.project_slug}}/CHEATSHEET.rst +++ b/{{cookiecutter.project_slug}}/CHEATSHEET.rst @@ -93,7 +93,7 @@ To make a release * Double-check it all works, docs build, etc. -* Build your sdist and wheel: ``python setup.py sdist bdist_wheel`` +* Build your sdist and wheel: ``python -m pep517.build --source --binary --out-dir dist/ .`` * Upload to PyPI: ``twine upload dist/*`` diff --git a/{{cookiecutter.project_slug}}/ci.sh b/{{cookiecutter.project_slug}}/ci.sh index 4c2bf71..1153e5d 100755 --- a/{{cookiecutter.project_slug}}/ci.sh +++ b/{{cookiecutter.project_slug}}/ci.sh @@ -76,8 +76,8 @@ python -c "import sys, struct, ssl; print('#' * 70); print('python:', sys.versio python -m pip install -U pip setuptools wheel python -m pip --version -python setup.py sdist --formats=zip -python -m pip install dist/*.zip +python -m pep517.build --source --out-dir dist/ . +python -m pip install dist/*.tar.gz if [ "$CHECK_DOCS" = "1" ]; then python -m pip install -r docs-requirements.txt diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index fcb68d4..fe0e796 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -5,3 +5,10 @@ directory = "newsfragments" underlines = ["-", "~", "^"] # COOKIECUTTER-TRIO-TODO: fill in the URL below to point to your issue tracker: issue_format = "`#{issue} `__" + +[build-system] +requires = [ + "setuptools >= 50.0.3", + "wheel >= 0.35.1", +] +build-backend = "setuptools.build_meta" From 07deaa36bcdd99d4575804184ad86e5a0e3dc88c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 3 Sep 2020 10:27:00 -0400 Subject: [PATCH 2/2] Add missing installation of pep517 dependency --- {{cookiecutter.project_slug}}/ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/ci.sh b/{{cookiecutter.project_slug}}/ci.sh index 1153e5d..4f62916 100755 --- a/{{cookiecutter.project_slug}}/ci.sh +++ b/{{cookiecutter.project_slug}}/ci.sh @@ -73,7 +73,7 @@ fi python -c "import sys, struct, ssl; print('#' * 70); print('python:', sys.version); print('version_info:', sys.version_info); print('bits:', struct.calcsize('P') * 8); print('openssl:', ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO); print('#' * 70)" -python -m pip install -U pip setuptools wheel +python -m pip install -U pip setuptools wheel pep517 python -m pip --version python -m pep517.build --source --out-dir dist/ .