diff --git a/smoke/venv.sh b/smoke/venv.sh index d5da8e2..e6b5b3c 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -49,6 +49,10 @@ python -c 'import sys; print(sys.version)' | head -n1 | grep $VERSION if [ "$VERSION" == "2.6" ]; then pip install pytest pip install Cython --install-option="--no-cython-compile" +elif [ "$VERSION" == "3.11" ]; then + # https://github.com/pytest-dev/py/issues/273 + SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PY=1.10.1 python -m pip install https://github.com/pytest-dev/py/archive/refs/heads/master.zip + python -m pip install pytest else python -m pip install pytest if [ "$PYTHON" != "jython" ]; then @@ -67,7 +71,8 @@ EOF python -m pytest -v test_foo.py # check that we can do extension modules -if [ "$PYTHON" != "jython" ]; then +# 3.11 problem: https://github.com/cython/cython/issues/4158 +if [ "$PYTHON" != "jython" ] && [ "$VERSION" != "3.11" ]; then cat > module.pyx << EOF cdef int add(int a, int b): return a + b @@ -128,5 +133,8 @@ deps = pytest commands = python -m pytest -v test_foo.py EOF -# A more complex example with pytest -tox +# A more complex example with pytest (which is broken on Python 3.11) +# https://github.com/pytest-dev/py/issues/273 +if [ "$VERSION" != "3.11" ]; then + tox +fi