Add Python 3.11 workarounds
This commit is contained in:
parent
2fc6fc00bc
commit
1adc399e3d
1 changed files with 11 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue