Skip to content

Commit

Permalink
- update to latest meta/config and add support for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Nov 2, 2022
1 parent 51cbb57 commit 70ca553
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 12 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand All @@ -130,7 +131,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
Expand All @@ -153,6 +154,16 @@ jobs:
pip install -U pip
pip install -U setuptools wheel twine cffi
- name: Build zope.proxy (3.11)
if: ${{ startsWith(matrix.python-version, '3.11') }}
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 --pre .[test]
- name: Build zope.proxy (Python 3.10 on MacOS)
if: >
startsWith(runner.os, 'Mac')
Expand Down Expand Up @@ -199,6 +210,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.11')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -220,6 +232,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand All @@ -245,7 +258,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
Expand All @@ -260,7 +273,21 @@ jobs:
with:
name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
- name: Install zope.proxy 3.11
if: ${{ startsWith(matrix.python-version, '3.11') }}
run: |
pip install -U wheel setuptools
# coverage has a wheel on PyPI for a future python version which is
# not ABI compatible with the current one, so build it from sdist:
pip install -U --no-binary :all: 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/zope.proxy-*whl -d src
pip install --pre -U -e .[test]
- name: Install zope.proxy
if: ${{ !startsWith(matrix.python-version, '3.11') }}
run: |
pip install -U wheel setuptools
pip install -U coverage
Expand Down Expand Up @@ -322,7 +349,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
Expand Down Expand Up @@ -373,7 +400,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
Expand Down Expand Up @@ -403,6 +430,7 @@ jobs:
manylinux:
runs-on: ubuntu-20.04
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
# We use a regular Python matrix entry to share as much code as possible.
strategy:
matrix:
Expand All @@ -425,7 +453,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
Expand Down
11 changes: 9 additions & 2 deletions .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tox_env_map() {
case $1 in
*"cp27"*) echo 'py27';;
*"cp35"*) echo 'py35';;
*"cp311"*) echo 'py311';;
*"cp36"*) echo 'py36';;
*"cp37"*) echo 'py37';;
*"cp38"*) echo 'py38';;
Expand All @@ -44,13 +45,19 @@ for PYBIN in /opt/python/*/bin; do
if \
[[ "${PYBIN}" == *"cp27"* ]] || \
[[ "${PYBIN}" == *"cp35"* ]] || \
[[ "${PYBIN}" == *"cp311"* ]] || \
[[ "${PYBIN}" == *"cp36"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${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
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "5c53fd90b1a529f2d1d4ed361d3bfa646520ba58"
commit-id = "70229255d495a945324228b50ee735cc75e01430"

[python]
with-appveyor = true
with-windows = false
with-pypy = true
with-future-python = false
with-future-python = true
with-legacy-python = true
with-docs = true
with-sphinx-doctests = true
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Changes
=========

4.5.2 (unreleased)
4.6.0 (unreleased)
==================

- Nothing changed yet.
- Add support for Python 3.11.


4.5.1 (2022-09-15)
Expand Down
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ environment:
- python: 39-x64
- python: 310
- python: 310-x64
# `multibuild` cannot install non-final versions as they are not on
# ftp.python.org, so we skip Python 3.11 until its final release:
- python: 311
- python: 311-x64

install:
- "SET PYTHONVERSION=%PYTHON%"
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def read(*rnames):
headers = [os.path.join('src', 'zope', 'proxy', 'proxy.h')]

setup(name='zope.proxy',
version='4.5.2.dev0',
version='4.6.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Generic Transparent Proxies',
Expand All @@ -105,6 +105,7 @@ def read(*rnames):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Framework :: Zope :: 3',
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ envlist =
py38,py38-pure
py39,py39-pure
py310,py310-pure
py311,py311-pure
pypy
pypy3
docs
coverage

[testenv]
usedevelop = true
pip_pre = py311: true
deps =
Sphinx
setenv =
pure: PURE_PYTHON=1
!pure-!pypy-!pypy3: PURE_PYTHON=0
Expand Down

0 comments on commit 70ca553

Please sign in to comment.