From 3cefb11dc46dd8d0cd6aad29087803eb6a6d207df65f0910112dbeafc82be487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Sep 2019 07:35:06 +0000 Subject: [PATCH] Accepting request 731055 from home:jayvdb:py3only - Use %python_expand in %check to allow building only one flavour OBS-URL: https://build.opensuse.org/request/show/731055 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=24 --- python-pyglet.changes | 5 +++++ python-pyglet.spec | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) 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