#42 Instead of checking for Jython, make it possible to opt-out from the Cython test
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
tests/ churchyard/python cython_optout  into  master

file modified
+8 -11
@@ -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

file modified
+4 -5
@@ -39,7 +39,7 @@ 

          run: VERSION=3.9 METHOD=venv ./venv.sh

      - smoke311:

          dir: smoke

-         run: VERSION=3.11 METHOD=venv ./venv.sh

+         run: VERSION=3.11 METHOD=venv CYTHON=false ./venv.sh

      - smoke39_seeder_pip:

          dir: smoke

          run: VERSION=3.9 METHOD=virtualenv-seeder-pip ./venv.sh
@@ -49,9 +49,9 @@ 

      - smokepypy:

          dir: smoke

          run: VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh

-     - smokepypy3:

+     - smokepypy38:

          dir: smoke

-         run: VERSION=3.7 METHOD=venv PYTHON=pypy3.7 ./venv.sh

+         run: VERSION=3.8 METHOD=venv PYTHON=pypy3.8 ./venv.sh

      - selftest37:

          dir: selftest

          run: VERSION=3.7 X="-x test_socket -x test_asyncgen -x test_asyncio -x test_compile -x test_concurrent_futures -x test_itertools -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_shutil -x test_time -x test_multiprocessing_spawn -x test_threading -x test_wsgiref" ./parallel.sh
@@ -75,11 +75,10 @@ 

      - python3.9

      - python3.11

      - pypy

-     - pypy3

+     - pypy3.8-devel

      - python2-devel

      - python3-devel

      - pypy-devel

-     - pypy3-devel

      - python3-tox

      - python3-tkinter

      - python3-test

  • we don't have Jython any more and even if we had, we could explicitly opt out from it
  • we sometimes need to opt out from Cython test in the development versions of Python

1 new commit added

  • Fixup the pypy3 test example
2 years ago

rebased onto bc948d6

2 years ago

Pull-Request has been merged by churchyard

2 years ago
Metadata