From bded0ce313cdb3b57f36b63ea602549f69c86482cafafb664dc0f3e810b0d479 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:36:18 +0000 Subject: [PATCH] Accepting request 730985 from home:jayvdb:py3only - Use %python_expand in %check to allow building only a single flavour OBS-URL: https://build.opensuse.org/request/show/730985 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyodbc?expand=0&rev=15 --- python-pyodbc.changes | 6 ++++++ python-pyodbc.spec | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python-pyodbc.changes b/python-pyodbc.changes index 9e5e085..8b1dd20 100644 --- a/python-pyodbc.changes +++ b/python-pyodbc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Sep 14 15:34:06 UTC 2019 - John Vandenberg + +- Use %python_expand in %check to allow building only a single + flavour + ------------------------------------------------------------------- Mon Aug 5 18:35:48 UTC 2019 - Dirk Hartmann diff --git a/python-pyodbc.spec b/python-pyodbc.spec index 1aca8b1..124cc53 100644 --- a/python-pyodbc.spec +++ b/python-pyodbc.spec @@ -43,6 +43,8 @@ even more. %prep %setup -q -n pyodbc-%{version} +mv tests2 tests-%{python2_bin_suffix} +mv tests3 tests-%{python3_bin_suffix} %build %python_build @@ -52,8 +54,9 @@ even more. %check export PYTHONDONTWRITEBYTECODE=1 -PYTHONPATH=%{buildroot}%{python3_sitearch} python3 tests3/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db" -PYTHONPATH=%{buildroot}%{python2_sitearch} python2 tests2/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db" +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} +$python tests-%{$python_bin_suffix}/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db" +} %files %{python_files} %{python_sitearch}/*