From 00fcf6379a0469cc6f4c9d93279c70ec056883f3 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Mon, 27 May 2024 10:20:08 -0400 Subject: [PATCH] Configuring for c-code --- .coveragerc | 1 + .github/workflows/tests.yml | 25 +++++++++++-------------- .manylinux-install.sh | 12 ++++++------ .meta.toml | 2 +- tox.ini | 1 + 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.coveragerc b/.coveragerc index 54c7a9d..89bc080 100644 --- a/.coveragerc +++ b/.coveragerc @@ -15,6 +15,7 @@ source = [report] show_missing = true precision = 2 +ignore_errors = True exclude_lines = except ImportError: if __name__ == '__main__': diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a6697f0..9d3a3ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -159,7 +159,7 @@ jobs: - name: Install Build Dependencies run: | pip install -U pip - pip install -U setuptools wheel twine + pip install -U "setuptools<69" wheel twine pip install -U zope.proxy - name: Build zope.security (macOS x86_64, Python 3.8+) @@ -236,14 +236,14 @@ jobs: with: name: zope.security-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl - - name: Publish package to PyPI (mac) - # We cannot 'uses: pypa/gh-action-pypi-publish@v1.4.1' because - # that's apparently a container action, and those don't run on - # the Mac. + - name: Publish package to PyPI (Non-Linux) + # We cannot use pypa/gh-action-pypi-publish because that + # is a container action, and those don't run on macOS + # or Windows GHA runners. if: > github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - && startsWith(runner.os, 'Mac') + && !startsWith(runner.os, 'Linux') && !startsWith(matrix.python-version, 'pypy') env: TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} @@ -324,7 +324,7 @@ jobs: path: dist/ - name: Install zope.security run: | - pip install -U wheel setuptools + pip install -U wheel "setuptools<69" pip install -U coverage pip install -U 'cffi; platform_python_implementation == "CPython"' # Unzip into src/ so that testrunner can find the .so files @@ -492,12 +492,9 @@ jobs: pip install -U wheel pip install -U `ls dist/zope.security-*`[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. - # TODO: Pick a linter and configuration and make this step right. run: | - pip install -U pylint - # python -m pylint --limit-inference-results=1 --rcfile=.pylintrc zope.security -f parseable -r n + pip install -U tox + tox -e lint manylinux: runs-on: ubuntu-latest @@ -593,5 +590,5 @@ jobs: with: user: __token__ password: ${{ secrets.TWINE_PASSWORD }} - skip_existing: true - packages_dir: wheelhouse/ + skip-existing: true + packages-dir: wheelhouse/ diff --git a/.manylinux-install.sh b/.manylinux-install.sh index ba47e27..d818c24 100755 --- a/.manylinux-install.sh +++ b/.manylinux-install.sh @@ -41,12 +41,12 @@ tox_env_map() { # Compile wheels for PYBIN in /opt/python/*/bin; do if \ - [[ "${PYBIN}" == *"cp311"* ]] || \ - [[ "${PYBIN}" == *"cp312"* ]] || \ - [[ "${PYBIN}" == *"cp37"* ]] || \ - [[ "${PYBIN}" == *"cp38"* ]] || \ - [[ "${PYBIN}" == *"cp39"* ]] || \ - [[ "${PYBIN}" == *"cp310"* ]] ; then + [[ "${PYBIN}" == *"cp311/"* ]] || \ + [[ "${PYBIN}" == *"cp312/"* ]] || \ + [[ "${PYBIN}" == *"cp37/"* ]] || \ + [[ "${PYBIN}" == *"cp38/"* ]] || \ + [[ "${PYBIN}" == *"cp39/"* ]] || \ + [[ "${PYBIN}" == *"cp310/"* ]] ; then "${PYBIN}/pip" install -e /io/ "${PYBIN}/pip" wheel /io/ -w wheelhouse/ if [ `uname -m` == 'aarch64' ]; then diff --git a/.meta.toml b/.meta.toml index eacb9bf..36b881c 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/c-code [meta] template = "c-code" -commit-id = "fbf8c395" +commit-id = "1c0f31f5" [python] with-appveyor = true diff --git a/tox.ini b/tox.ini index ad4a3ef..efbe3c6 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ envlist = [testenv] usedevelop = true deps = + setuptools < 69 py37: urllib3 < 2 setenv = pure: PURE_PYTHON=1