From ef40c4775a0c3cbd2323a6fa266126a230d04a257d1b065aef50543c0b036d6e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 26 Jul 2023 18:05:20 +0000 Subject: [PATCH] - Make the test suite pass again (gh#rogerbinns/apsw#462). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apsw?expand=0&rev=38 --- python-apsw.changes | 1 + python-apsw.spec | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/python-apsw.changes b/python-apsw.changes index cdd994c..c56852a 100644 --- a/python-apsw.changes +++ b/python-apsw.changes @@ -26,6 +26,7 @@ Wed Jul 26 14:57:47 UTC 2023 - Matej Cepl - speedtest now shows summary statistics, and improved help text. (APSW issue 444) - Clean up the SPEC file, use %pyproject_* macros instead. +- Make the test suite pass again (gh#rogerbinns/apsw#462). ------------------------------------------------------------------- Tue Jun 20 12:17:34 UTC 2023 - ecsos diff --git a/python-apsw.spec b/python-apsw.spec index acbacbe..325b1c0 100644 --- a/python-apsw.spec +++ b/python-apsw.spec @@ -43,18 +43,27 @@ complete SQLite API into Python. %prep %autosetup -p1 -n apsw-%{version} +# See the discussion on gh#rogerbinns/apsw#462 +cat << EOF >setup.apsw +[build_ext] +use_system_sqlite_config = true +EOF + %build export CFLAGS="%{optflags} -fno-strict-aliasing" %pyproject_wheel +%python_exec setup.py build_test_extension %install %pyproject_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitearch} %check # gh#rogerbinns/apsw#462 -# export CFLAGS="%%{optflags} -fno-strict-aliasing" -# %%pyunittest -v apsw/tests.py +# We cannot use %pyunittest_arch here, see the ticket for the discussion +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 +$python -m apsw.tests -v +} %files %{python_files} %license LICENSE