From ad0f2bcc007747befbb3eaf1ce2194da8b191ae2 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 25 May 2021 21:26:41 -0400 Subject: [PATCH 1/7] Remove setup.py --- pyproject.toml | 7 +++++-- setup.cfg | 2 -- setup.py | 17 ----------------- 3 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 21b5d297..ef8c00e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,9 @@ +# pyproject.toml [build-system] -requires = ["setuptools>=40.8", "wheel", "setuptools_scm>=1.15"] -build-backend = "setuptools.build_meta:__legacy__" +requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] [tool.towncrier] package = "twine" diff --git a/setup.cfg b/setup.cfg index f338bdae..579020f1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,8 +43,6 @@ install_requires= keyring >= 15.1 rfc3986 >= 1.4.0 colorama >= 0.4.3 -setup_requires = - setuptools_scm >= 1.15 include_package_data = True [options.entry_points] diff --git a/setup.py b/setup.py deleted file mode 100644 index e69bda64..00000000 --- a/setup.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2018 Donald Stufft and individual contributors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import setuptools - - -setuptools.setup(use_scm_version=True) From d29d0ea1a9ae280a4bbe11b4706119c912710794 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 25 May 2021 21:32:50 -0400 Subject: [PATCH 2/7] Use isolated_build for pyproject.toml --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index cb6141d2..39296c1c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] minversion = 2.4 envlist = lint,types,py{36,37,38,39},integration,docs +isolated_build = True [testenv] deps = From 912602fb3dd442202249f0f8f9db15a1fae08fba Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 25 May 2021 21:40:26 -0400 Subject: [PATCH 3/7] Remove 'twine check' from docs build --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 39296c1c..001c9f12 100644 --- a/tox.ini +++ b/tox.ini @@ -36,8 +36,6 @@ commands = sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html doc8 docs README.rst --ignore-path docs/_build/html sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck - python setup.py sdist - twine check dist/* [testenv:watch-docs] deps = From 6a22c86d93a2f7dac532d46f59d492a1e6714939 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 25 May 2021 21:48:13 -0400 Subject: [PATCH 4/7] Add 'twine check' to release --- setup.cfg | 1 + tox.ini | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 579020f1..dc949f20 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,7 @@ author = Donald Stufft and individual contributors author_email = donald@stufft.io description = Collection of utilities for publishing packages on PyPI long_description = file:README.rst +long_description_content_type = text/x-rst url = https://twine.readthedocs.io/ project_urls = Source = https://github.com/pypa/twine/ diff --git a/tox.ini b/tox.ini index 001c9f12..f2609f8a 100644 --- a/tox.ini +++ b/tox.ini @@ -84,13 +84,10 @@ commands = towncrier {posargs} [testenv:release] -# disabled for twine to cause it to upload itself -# skip_install = True # specify Python 3 to use platform's default Python 3 basepython = python3 deps = pep517>=0.5 - twine>=1.13 path.py passenv = TWINE_PASSWORD @@ -100,6 +97,7 @@ setenv = commands = python -c "import path; path.Path('dist').rmtree_p()" python -m pep517.build . + python -m twine check --strict dist/* python -m twine upload dist/* [testenv:devpi] From 90e738837e6cdef886f0d23176657f9bb04d8275 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 25 May 2021 21:50:59 -0400 Subject: [PATCH 5/7] Use build instead of pep517 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index f2609f8a..e80d9597 100644 --- a/tox.ini +++ b/tox.ini @@ -87,7 +87,7 @@ commands = # specify Python 3 to use platform's default Python 3 basepython = python3 deps = - pep517>=0.5 + build path.py passenv = TWINE_PASSWORD @@ -96,7 +96,7 @@ setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = python -c "import path; path.Path('dist').rmtree_p()" - python -m pep517.build . + python -m build python -m twine check --strict dist/* python -m twine upload dist/* From a417c3b90a7acba6cfbc62b8f3163a739b1d80c7 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 29 May 2021 15:05:44 -0400 Subject: [PATCH 6/7] Update tox minversion Co-authored-by: Jason R. Coombs --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e80d9597..453a45e2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 2.4 +minversion = 3.3 envlist = lint,types,py{36,37,38,39},integration,docs isolated_build = True From 802472a4f056e99e98952acfcf93cc319b12f05c Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 29 May 2021 15:32:49 -0400 Subject: [PATCH 7/7] Move 'twine check' back to docs --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 453a45e2..d92d8a2b 100644 --- a/tox.ini +++ b/tox.ini @@ -36,6 +36,7 @@ commands = sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html doc8 docs README.rst --ignore-path docs/_build/html sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck + python -m twine check --strict {distdir}/* [testenv:watch-docs] deps = @@ -97,7 +98,6 @@ setenv = commands = python -c "import path; path.Path('dist').rmtree_p()" python -m build - python -m twine check --strict dist/* python -m twine upload dist/* [testenv:devpi]