diff --git a/python-pyglet.changes b/python-pyglet.changes index 1cd5ba1..306ec0d 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Sep 15 07:07:32 UTC 2019 - John Vandenberg + +- Use %python_expand in %check to allow building only one flavour + ------------------------------------------------------------------- Wed Mar 20 13:34:05 UTC 2019 - John Vandenberg diff --git a/python-pyglet.spec b/python-pyglet.spec index a5108bb..617448d 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -271,15 +271,19 @@ pytest_addopts="--instafail --error-for-skips --timeout=30 " pytest_addopts="$pytest_addopts tests/unit tests/integration" +%{python_expand # # These are only problematic on Python 2, and are restored after Python 2 tests # https://bitbucket.org/pyglet/pyglet/issues/223/clock-test-failures -mv tests/unit/test_clock.py tests/unit/.test_clock.py +if [ $python = python2 ]; then + mv tests/unit/test_clock.py tests/unit/.test_clock.py +fi -python2 -m pytest $pytest_addopts -k "not ($pytest_k_list)" +$python -m pytest $pytest_addopts -k "not ($pytest_k_list)" -mv tests/unit/.test_clock.py tests/unit/test_clock.py - -python3 -m pytest $pytest_addopts -k "not ($pytest_k_list)" +if [ -x tests/unit/.test_clock.py ]; then + mv tests/unit/.test_clock.py tests/unit/test_clock.py +fi +} # endif test %endif