From fc062cb2124e8d9071958c5143c982f5713e081d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 19:24:57 -0500 Subject: [PATCH 01/10] Add build-system to pyproject.toml for pep517 --- pyproject.toml | 8 ++++++++ setup.py | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2826ee30..cc8b19d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,3 +53,11 @@ exclude = ''' )/ ) ''' + +[build-system] +requires = [ + "setuptools ~= 51.2", + "wheel ~= 0.36.2", + "incremental == 17.5.0", +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index caaed461..14b8f0f7 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,11 @@ from setuptools import setup, find_packages +# If incremental is not present then setuptools just silently uses v0.0.0 so +# let's import it and fail instead. +import incremental + + setup( name="towncrier", maintainer="Amber Brown", @@ -36,7 +41,6 @@ "Programming Language :: Python :: Implementation :: PyPy", ], use_incremental=True, - setup_requires=["incremental"], install_requires=["click", "click-default-group", "incremental", "jinja2", "toml"], package_dir={"": "src"}, packages=find_packages("src"), From dca38a33eb20c7eaf40e1420d131da97cb374d6a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 19:28:10 -0500 Subject: [PATCH 02/10] add 314.feature.rst --- src/towncrier/newsfragments/314.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/towncrier/newsfragments/314.feature.rst diff --git a/src/towncrier/newsfragments/314.feature.rst b/src/towncrier/newsfragments/314.feature.rst new file mode 100644 index 00000000..91ce0ef1 --- /dev/null +++ b/src/towncrier/newsfragments/314.feature.rst @@ -0,0 +1 @@ +Support building with PEP 517. From e0bec0a09bd22483534bd6a75e4d3472c68706d1 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 19:39:01 -0500 Subject: [PATCH 03/10] isolated_build --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 2b253a19..69c06af4 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,8 @@ deps = incremental mock +isolated_build = True + commands = python -V coverage --version From 76c92a24543fa6847e3efae6dcc42e7126d076cf Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 20:32:46 -0500 Subject: [PATCH 04/10] oh my, wheels --- tox.ini | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 69c06af4..58249787 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,8 @@ [tox] envlist = cov-erase, flake8, {pypy27,pypy36,pypy37,py27,py35,py36,py37}-{tests,flake8,check-manifest,check-newsfragment}, cov-report +requires= + virtualenv>=20.0.35 + tox-wheel>=0.5.0 skip_missing_envs = true [testenv:flake8] @@ -29,9 +32,9 @@ deps = coverage incremental mock - isolated_build = True - +wheel = True +wheel_pep517 = True commands = python -V coverage --version From a061951b4e77ea58cc020b8add08e5cadcaeaa19 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 20:33:25 -0500 Subject: [PATCH 05/10] no more isolation, but it probably still is --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 58249787..0f43e166 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,6 @@ deps = coverage incremental mock -isolated_build = True wheel = True wheel_pep517 = True commands = From ba56cc52d99810f93cfa3a2667025a06e7eda7e8 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 16 Jan 2021 20:41:58 -0500 Subject: [PATCH 06/10] old setuptools for py2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc8b19d1..df86fa4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ exclude = ''' [build-system] requires = [ - "setuptools ~= 51.2", + "setuptools ~= 44.1.1", "wheel ~= 0.36.2", "incremental == 17.5.0", ] From c48e59fb2050e7ee5224c69debf942eaa6adc906 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sun, 17 Jan 2021 14:57:18 -0500 Subject: [PATCH 07/10] Apply suggestions from code review Co-authored-by: Thomas Grainger --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 0f43e166..cadf84c1 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ envlist = cov-erase, flake8, {pypy27,pypy36,pypy37,py27,py35,py36,py37}-{tests,flake8,check-manifest,check-newsfragment}, cov-report requires= virtualenv>=20.0.35 - tox-wheel>=0.5.0 + tox-wheel>=0.6.0 +isolated_build=true skip_missing_envs = true [testenv:flake8] @@ -33,7 +34,6 @@ deps = incremental mock wheel = True -wheel_pep517 = True commands = python -V coverage --version From a8b357c966902b12d381e37c782cabff45ca1ceb Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 27 Feb 2021 15:52:06 -0500 Subject: [PATCH 08/10] Update ci.yml --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 840d6e31..1b1d71eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,9 @@ jobs: - uses: twisted/python-info-action@v1.0.1 + - name: Try creating an env + run: python -m venv a_unique_env_directory + - name: Install dependencies run: python -m pip install --upgrade pip tox codecov From c6b79c8c184bfb8556e571103e8f65bbfd75c54e Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 27 Feb 2021 15:56:03 -0500 Subject: [PATCH 09/10] Update ci.yml --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b1d71eb..769ba2c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,30 +24,39 @@ jobs: - name: CPython 2.7 tox: py27 action: 2.7 + major: 2 - name: CPython 3.5 tox: py35 action: 3.5 + major: 3 - name: CPython 3.6 tox: py36 action: 3.6 + major: 3 - name: CPython 3.7 tox: py37 action: 3.7 + major: 3 - name: CPython 3.8 tox: py38 action: 3.8 + major: 3 - name: CPython 3.9 tox: py39 action: 3.9 + major: 3 - name: PyPy 2.7 tox: pypy27 action: pypy-2.7 + major: 2 - name: PyPy 3.6 tox: pypy36 action: pypy-3.6 + major: 3 - name: PyPy 3.7 tox: pypy37 action: pypy-3.7 + major: 3 task: - name: Test tox: tests @@ -71,7 +80,10 @@ jobs: - uses: twisted/python-info-action@v1.0.1 - name: Try creating an env - run: python -m venv a_unique_env_directory + if: matrix.python.major == 3 + run: | + python -m venv a_unique_env_directory + tree a_unique_env_directory - name: Install dependencies run: python -m pip install --upgrade pip tox codecov From b08007e5274f500c01bea2ed1171bafe6ba4ed47 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Sat, 27 Feb 2021 16:00:14 -0500 Subject: [PATCH 10/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 769ba2c5..00450590 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: if: matrix.python.major == 3 run: | python -m venv a_unique_env_directory - tree a_unique_env_directory + tree /f a_unique_env_directory - name: Install dependencies run: python -m pip install --upgrade pip tox codecov