Skip to content

Commit

Permalink
Merge pull request #65 from antocuni/wridgers--py311
Browse files Browse the repository at this point in the history
Python 3.11
  • Loading branch information
wridgers authored Jul 13, 2023
2 parents 6ca1206 + b4bac33 commit 38505c7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 26 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ jobs:
tox_tests:
name: tox -e ${{ matrix.toxenv }}

runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- python-version: '2.7'
toxenv: 'py27-test-nopyx'

- python-version: '2.7'
toxenv: 'py27-test'

- python-version: '3.6'
toxenv: 'py36-test'

Expand All @@ -41,6 +35,9 @@ jobs:
- python-version: '3.10'
toxenv: 'py310-test'

- python-version: '3.11'
toxenv: 'py311-test'

- python-version: 'pypy-3.7'
toxenv: 'pypy3-test'

Expand Down Expand Up @@ -68,7 +65,7 @@ jobs:
pip install -U pip # so that we can use wheels
# tox creates the sdist: we need cython to be installed in the env which
# creates the sdist, to generate the .c files
pip install tox cython>=0.29.21
pip install tox==3.28.0 cython>=0.29.30
- name: Run tox
run: tox -e ${{ matrix.toxenv }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# these are the files produced by cython when building inplace
capnpy/*.c
capnpy/*.html
capnpy/*.so
capnpy/segment/*.c
capnpy/segment/*.html
travis/travis.rsa
capnpy/segment/*.so
capnpy.egg-info
travis/travis.rsa

build
__pycache__
.tox
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ install:
- pip install tox-travis
# tox creates the sdist: we need cython to be installed in the env which
# creates the sdist, to generate the .c files
- pip install cython>=0.25
- pip install cython>=0.29.30

script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/clone-benchmarks-repo.sh; fi
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ annotate:
schema: annotate
python -m capnpy compile capnpy/schema.capnp --no-pyx --no-convert-case --no-version-check --no-reflection

# run only python2 and python3 tests: this should good enough to be checked
# run only python3 tests: this should good enough to be checked
# locally before pushing and run the whole tests on travis
test:
tox -e py27-test,py36-test,py37-test,py38-test
tox -e py36-test,py37-test,py38-test
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
def my_cythonize(extensions):
try:
import Cython
if Cython.__version__ < '0.29.21':
print ('WARNING: required cython>0.29.21, found %s. The .c files will '
if Cython.__version__ < '0.29.30':
print ('WARNING: required cython>0.29.30, found %s. The .c files will '
'NOT be regenerated' % Cython.__version__)
raise ImportError
from Cython.Build import cythonize
Expand Down Expand Up @@ -163,7 +163,7 @@ def getext(fname):

if USE_CYTHON:
ext_modules = get_cython_extensions()
extra_install_requires = ['cython>=0.25']
extra_install_requires = ['cython>=0.29.30']
else:
ext_modules = []
extra_install_requires = []
Expand Down
12 changes: 2 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
[tox]
# nopyx is a special env where Cython is NOT installed, and thus we run
# pure-python tests
envlist = py27-test-nopyx,py27-{test,bench},py35-test,py36-test,py37-test,py38-test,py39-test,[y310-test,pypy-{test,bench},pypy3-{test},docs
envlist = py35-test,py36-test,py37-test,py38-test,py39-test,py310-test,py311-test,pypy-{test,bench},pypy3-{test},docs

[testenv]
setenv =
TOX_ENV={envname}

deps =
py27: pytest==4.6.11
!py27: pytest==6.2.5
pytest==6.2.5
#git+https://github.com/antocuni/pytest-benchmark.git#egg=pytest-benchmark
py27: pkgconfig==1.5.2
py27: pycapnp==0.6.4

commands =
test: py.test {envsitepackagesdir}/capnpy/testing -rs --pyx {posargs}
bench: echo "BENCHMARKS ARE DISABLED" && false
#bench: py.test {envsitepackagesdir}/capnpy/benchmarks -rs --benchmark-autosave {posargs}


[testenv:py27-test-nopyx]
setenv =
USE_CYTHON=0


[testenv:docs]
setenv =
USE_CYTHON=0
Expand Down
2 changes: 1 addition & 1 deletion travis/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PYTHONS=(

for pydir in "${PYTHONS[@]}"; do
pybin=/opt/python/$pydir/bin
"${pybin}/pip" install 'cython>=0.25'
"${pybin}/pip" install 'cython>=0.29.30'
"${pybin}/pip" wheel /capnpy/ -w wheelhouse/

# workaround for this bug:
Expand Down

0 comments on commit 38505c7

Please sign in to comment.