From 7ac274198d5ae35e7c226d70529bdd057356852d Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Mon, 20 Jun 2022 08:23:00 +0200 Subject: [PATCH 01/12] Fix GHA Python 3.10 build on MacOS Using a setuptools version which worked up to last week. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd5f5b1..d3d451d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -143,7 +143,7 @@ jobs: - name: Install Build Dependencies run: | pip install -U pip - pip install -U setuptools wheel twine cffi + pip install -U "setuptools < 62.4" wheel twine cffi - name: Build zope.security run: | From 3829cdb71a128ebf74c69e5d3a7799440cc6b059 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Mon, 20 Jun 2022 08:27:59 +0200 Subject: [PATCH 02/12] Ensure we actually get the older setup tools version. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3d451d..5308db9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -143,7 +143,7 @@ jobs: - name: Install Build Dependencies run: | pip install -U pip - pip install -U "setuptools < 62.4" wheel twine cffi + pip install -U wheel twine cffi "setuptools < 62.4" - name: Build zope.security run: | From 6ed3004cd6c19298c447e9bf3c3dd125cc761cbb Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Mon, 20 Jun 2022 08:33:03 +0200 Subject: [PATCH 03/12] Make versions equal to last successful run. Even though this does not seem to be the problem. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5308db9..4a4913a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -143,7 +143,7 @@ jobs: - name: Install Build Dependencies run: | pip install -U pip - pip install -U wheel twine cffi "setuptools < 62.4" + pip install -U wheel twine cffi "setuptools < 62.4" "certifi < 2022.6.15" - name: Build zope.security run: | From 6eeb92cc15f7aaba0254c321f47ab84b6483c893 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Mon, 20 Jun 2022 08:36:38 +0200 Subject: [PATCH 04/12] Clear cache. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4a4913a..4e71fd2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -136,9 +136,9 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }} + key: ${{ runner.os }}-pip-2-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-pip-2- - name: Install Build Dependencies run: | From 8dc56a1732289608cf9f19d1969a147ef017a8df Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Tue, 21 Jun 2022 08:17:05 +0200 Subject: [PATCH 05/12] Try to remove .eggs. --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e71fd2..ada4deb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -149,6 +149,7 @@ jobs: run: | # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure # output (pip install uses a random temporary directory, making this difficult). + rm -rf /Users/runner/work/zope.security/zope.security/.eggs python setup.py build_ext -i python setup.py bdist_wheel # Also install it, so that we get dependencies in the (pip) cache. From 214099f77f5f15d4a7a6e46e7826ca0a43f17896 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Tue, 21 Jun 2022 08:21:09 +0200 Subject: [PATCH 06/12] Delete later. --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ada4deb..4cefd51 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -149,8 +149,10 @@ jobs: run: | # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure # output (pip install uses a random temporary directory, making this difficult). - rm -rf /Users/runner/work/zope.security/zope.security/.eggs + echo ">>> python setup.py build_ext -i" python setup.py build_ext -i + echo ">>> rm -rf /Users/runner/work/zope.security/zope.security/.eggs" + rm -rf /Users/runner/work/zope.security/zope.security/.eggs python setup.py bdist_wheel # Also install it, so that we get dependencies in the (pip) cache. pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' From 0dc4c5ea1642ebb987acb191ffbe177228b4e84f Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 22 Jun 2022 08:11:02 +0200 Subject: [PATCH 07/12] Try out Python 3.10.4, the version used the last time it worked. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4cefd51..f088c30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,7 +103,7 @@ jobs: - "3.7" - "3.8" - "3.9" - - "3.10" + - "3.10.4" - "3.11.0-beta.1" os: [ubuntu-20.04, macos-latest] exclude: From 60ba37c3644aea7f066b23216dfd70751caa06cc Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Thu, 23 Jun 2022 08:18:40 +0200 Subject: [PATCH 08/12] Try out to set host platform. --- .github/workflows/tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f088c30..887ca8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -150,13 +150,11 @@ jobs: # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure # output (pip install uses a random temporary directory, making this difficult). echo ">>> python setup.py build_ext -i" - python setup.py build_ext -i - echo ">>> rm -rf /Users/runner/work/zope.security/zope.security/.eggs" - rm -rf /Users/runner/work/zope.security/zope.security/.eggs - python setup.py bdist_wheel + _PYTHON_HOST_PLATFORM="macosx-11-x86_64" python setup.py build_ext -i + _PYTHON_HOST_PLATFORM="macosx-11-x86_64" python setup.py bdist_wheel # Also install it, so that we get dependencies in the (pip) cache. pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' - pip install --pre .[test] + _PYTHON_HOST_PLATFORM="macosx-11-x86_64" pip install --pre .[test] - name: Check zope.security build run: | From 1b15addf2b936427d48ab4718aa04b66a28a3b85 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 24 Jun 2022 07:53:57 +0200 Subject: [PATCH 09/12] Need to pin to minor version to tests can find the wheel. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 887ca8f..7fcfae8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,7 +103,7 @@ jobs: - "3.7" - "3.8" - "3.9" - - "3.10.4" + - "3.10" - "3.11.0-beta.1" os: [ubuntu-20.04, macos-latest] exclude: From 792850f8145182dc48ae3160982bf31ef830462a Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 29 Jun 2022 08:21:13 +0200 Subject: [PATCH 10/12] Minimize diff. --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7fcfae8..58db3e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -136,14 +136,14 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-2-${{ matrix.python-version }} + key: ${{ runner.os }}-pip-${{ matrix.python-version }} restore-keys: | - ${{ runner.os }}-pip-2- + ${{ runner.os }}-pip- - name: Install Build Dependencies run: | pip install -U pip - pip install -U wheel twine cffi "setuptools < 62.4" "certifi < 2022.6.15" + pip install -U setuptools wheel twine cffi - name: Build zope.security run: | From 6ab34d23a7d15a884ad181a020d7d2969b80df21 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 29 Jun 2022 08:24:36 +0200 Subject: [PATCH 11/12] Minimize diff even further. --- .github/workflows/tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58db3e6..8beb8c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,15 +146,16 @@ jobs: pip install -U setuptools wheel twine cffi - name: Build zope.security + env: + _PYTHON_HOST_PLATFORM: macosx-11-x86_64 run: | # Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure # output (pip install uses a random temporary directory, making this difficult). - echo ">>> python setup.py build_ext -i" - _PYTHON_HOST_PLATFORM="macosx-11-x86_64" python setup.py build_ext -i - _PYTHON_HOST_PLATFORM="macosx-11-x86_64" python setup.py bdist_wheel + python setup.py build_ext -i + python setup.py bdist_wheel # Also install it, so that we get dependencies in the (pip) cache. pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' - _PYTHON_HOST_PLATFORM="macosx-11-x86_64" pip install --pre .[test] + pip install --pre .[test] - name: Check zope.security build run: | From 092cbadd7a15ad6891e3504a4f53de921d5db5a7 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 29 Jun 2022 08:43:19 +0200 Subject: [PATCH 12/12] Try to fix issue that wrong wheel is used. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8beb8c0..e88995d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -321,7 +321,7 @@ jobs: run: | pip install -U wheel pip install -U coverage - pip install -U "`ls dist/zope.security-*.whl`[docs]" + pip install -U "`ls dist/zope.security-${{ runner.os }}-${{ matrix.python-version }}.whl`[docs]" - name: Build docs env: ZOPE_INTERFACE_STRICT_IRO: 1 @@ -372,7 +372,7 @@ jobs: run: | pip install -U pip pip install -U wheel - pip install -U `ls dist/zope.security-*`[test] + pip install -U `ls dist/zope.security-${{ runner.os }}-${{ matrix.python-version }}`[test] - name: Lint # We only need to do this on one version, and it should be Python 3, because # pylint has stopped updating for Python 2.