Skip to content

Commit

Permalink
Merge a4178e7 into ca2fb6e
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jul 13, 2022
2 parents ca2fb6e + a4178e7 commit a29673a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.6"
- "3.11.0-beta.3"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -139,7 +139,8 @@ jobs:
pip install -U pip
pip install -U setuptools wheel twine cffi
- name: Build AccessControl
- name: Build AccessControl (3.11.0-beta.3)
if: ${{ startsWith(matrix.python-version, '3.11.0-beta.3') }}
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).
Expand All @@ -148,6 +149,33 @@ jobs:
# 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]
- name: Build AccessControl (Python 3.10 on MacOS)
if: >
startsWith(runner.os, 'Mac')
&& startsWith(matrix.python-version, '3.10')
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).
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"'
pip install .[test]
- name: Build AccessControl (all other versions)
if: >
!startsWith(runner.os, 'Mac')
|| !startsWith(matrix.python-version, '3.10')
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).
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"'
pip install .[test]
- name: Check AccessControl build
run: |
Expand All @@ -167,7 +195,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.11.0-alpha.6')
&& !startsWith(matrix.python-version, '3.11.0-beta.3')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -187,7 +215,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.6"
- "3.11.0-beta.3"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -224,7 +252,8 @@ jobs:
with:
name: AccessControl-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
- name: Install AccessControl
- name: Install AccessControl 3.11.0-beta.3
if: ${{ startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
pip install -U wheel setuptools
# coverage has a wheel on PyPI for a future python version which is
Expand All @@ -236,6 +265,17 @@ jobs:
# might also save some build time?
unzip -n dist/AccessControl-*whl -d src
pip install --pre -U -e .[test]
- name: Install AccessControl
if: ${{ !startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
pip install -U wheel setuptools
pip install -U coverage
pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
# Unzip into src/ so that testrunner can find the .so files
# when we ask it to load tests from that directory. This
# might also save some build time?
unzip -n dist/AccessControl-*whl -d src
pip install -U -e .[test]
- name: Run tests with C extensions
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: |
Expand Down
9 changes: 7 additions & 2 deletions .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ for PYBIN in /opt/python/*/bin; do
[[ "${PYBIN}" == *"cp38"* ]] || \
[[ "${PYBIN}" == *"cp39"* ]] || \
[[ "${PYBIN}" == *"cp310"* ]] ; then
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
if [[ "${PYBIN}" == *"cp311"* ]] ; then
"${PYBIN}/pip" install --pre -e /io/
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
else
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
fi
if [ `uname -m` == 'aarch64' ]; then
cd /io/
"${PYBIN}/pip" install tox
Expand Down
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "eadba64bcfb4aca29fffa2fd06689ea445b8c710"
commit-id = "3b0babc5e22965d6018e8ed96b67354ecdd8ec6a"

[python]
with-appveyor = true
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ envlist =

[testenv]
usedevelop = true
pip_pre = true
pip_pre = py311: true
deps =
setenv =
pure: PURE_PYTHON=1
Expand Down

0 comments on commit a29673a

Please sign in to comment.