From b3d405a51633e1cef829c9a17e3b15b494f2214f Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Aug 29 2018 10:32:01 +0000 Subject: [PATCH 1/2] Allow testing pypys: METHOD=virtualenv PYTHON=pypy3 VERSION=3.5 ./smoke/venv.sh METHOD=venv PYTHON=pypy3 VERSION=3.5 ./smoke/venv.sh METHOD=virtualenv PYTHON=pypy VERSION=2.7 ./smoke/venv.sh --- diff --git a/smoke/venv.sh b/smoke/venv.sh index 3527657..58bb1a5 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -2,7 +2,7 @@ # set python version VERSION=${VERSION:-3.7} -PYTHON=python$VERSION +PYTHON=${PYTHON:-python$VERSION} METHOD=${METHOD:-venv} TOX=${TOX:-true} @@ -82,4 +82,8 @@ deps = pytest commands = python -m pytest -v test_foo.py EOF -tox -e py${VERSION/./} +if [[ $PYTHON == python* ]]; then + tox -e py${VERSION/./} +else + tox -e $PYTHON +fi From c56363e23ae7535d7f853151f46b5fed6e706487 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Aug 29 2018 11:53:20 +0000 Subject: [PATCH 2/2] Allow to test Jython METHOD=virtualenv PYTHON=jython VERSION=2.7 ./smoke/venv.sh --- diff --git a/smoke/venv.sh b/smoke/venv.sh index 58bb1a5..9585acc 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -34,7 +34,10 @@ if [ "$VERSION" == "2.6" ]; then pip install pytest pip install Cython --install-option="--no-cython-compile" else - python -m pip install pytest Cython + python -m pip install pytest + if [ "$PYTHON" != "jython" ]; then + python -m pip install Cython + fi fi # run tests @@ -46,6 +49,7 @@ EOF python -m pytest -v test_foo.py # check that we can do extension modules +if [ "$PYTHON" != "jython" ]; then cat > module.pyx << EOF cdef int add(int a, int b): return a + b @@ -66,6 +70,7 @@ EOF python setup.py build_ext --inplace python -c 'import module; print(module.two())' | grep '^2$' +fi # deactivate has unset variable, it's known set +u