| |
@@ -8,6 +8,7 @@
|
| |
PYTHON=${PYTHON:-python$VERSION}
|
| |
METHOD=${METHOD:-venv}
|
| |
TOX=${TOX:-true}
|
| |
+ CYTHON=${CYTHON:-true}
|
| |
INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false}
|
| |
|
| |
# clean from possible older runs
|
| |
@@ -46,16 +47,12 @@
|
| |
python -c 'import sys; print(sys.version)' | head -n1 | grep $VERSION
|
| |
|
| |
# install packages with pip
|
| |
- if [ "$VERSION" == "2.6" ]; then
|
| |
- pip install pytest
|
| |
- pip install Cython --install-option="--no-cython-compile"
|
| |
- elif [ "$VERSION" == "3.11" ]; then
|
| |
- python -m pip install pytest
|
| |
- # Cython support for 3.11.0a1+ is not yet released
|
| |
- python -m pip install https://github.com/cython/cython/archive/master.tar.gz --install-option="--no-cython-compile"
|
| |
- else
|
| |
- python -m pip install pytest
|
| |
- if [ "$PYTHON" != "jython" ]; then
|
| |
+ python -m pip install pytest
|
| |
+ if [ "$CYTHON" == "true" ]; then
|
| |
+ if [ "$VERSION" == "3.11" ]; then
|
| |
+ # Cython support for 3.11.0a1+ is not yet released
|
| |
+ python -m pip install https://github.com/cython/cython/archive/master.tar.gz --install-option="--no-cython-compile"
|
| |
+ else
|
| |
# We try to fetch a wheel only and if that fails, we disable compilation
|
| |
# Useful for fresh CPythons, where wheels are not yet ready, but Cython defaults to compiling
|
| |
python -m pip install Cython --only-binary :all: || python -m pip install Cython --install-option="--no-cython-compile"
|
| |
@@ -70,7 +67,7 @@
|
| |
|
| |
python -m pytest -v test_foo.py
|
| |
|
| |
- if [ "$PYTHON" != "jython" ]; then
|
| |
+ if [ "$CYTHON" == "true" ]; then
|
| |
cat > module.pyx << EOF
|
| |
cdef int add(int a, int b):
|
| |
return a + b
|
| |