From 058f38d5483238afe5706f796bed3dbc44fdee95c64aa79c0ab5f2e8a97f5f53 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 26 Oct 2020 19:49:07 +0000 Subject: [PATCH] Accepting request 843690 from home:bnavigator:branches:Virtualization Qnother supersede. Actually, setuptools is not required - Use %pycache_only %python_sitelib instead of %python3_sitelib in order to support multiple python3 flavors gh#openSUSE/python-rpm-macros#66 - Enable test suite. It is mandatory for python packages and upstream's next major version update will have more tests. OBS-URL: https://build.opensuse.org/request/show/843690 OBS-URL: https://build.opensuse.org/package/show/Virtualization/python-libvirt-python?expand=0&rev=84 --- python-libvirt-python.changes | 9 +++++++++ python-libvirt-python.spec | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/python-libvirt-python.changes b/python-libvirt-python.changes index 25d254b..2aede93 100644 --- a/python-libvirt-python.changes +++ b/python-libvirt-python.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Oct 23 19:56:04 UTC 2020 - Benjamin Greiner + +- Use %pycache_only %python_sitelib instead of %python3_sitelib in + order to support multiple python3 flavors + gh#openSUSE/python-rpm-macros#66 +- Enable test suite. It is mandatory for python packages and + upstream's next major version update will have more tests. + ------------------------------------------------------------------- Mon Oct 12 19:34:25 UTC 2020 - James Fehlig diff --git a/python-libvirt-python.spec b/python-libvirt-python.spec index 94651ac..a1e15f5 100644 --- a/python-libvirt-python.spec +++ b/python-libvirt-python.spec @@ -19,7 +19,7 @@ # No longer build for python2. Support was dropped upstream in the 6.0.0 release %define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define srcname libvirt-python Name: python-libvirt-python URL: https://libvirt.org/ @@ -37,6 +37,7 @@ BuildRequires: libvirt-devel = %{version} BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module xml} %ifpython2 Provides: libvirt-python = %{version} @@ -68,9 +69,13 @@ export CFLAGS="%{optflags}" %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} +%check +%pytest_arch + %files %{python_files} %doc ChangeLog AUTHORS README COPYING COPYING.LESSER examples/ -%{python_sitearch}/* -%pycache_only %{python3_sitearch}/__pycache__/* +%{python_sitearch}/libvirt* +%{python_sitearch}/libvirt_python-%{version}*info +%pycache_only %{python_sitearch}/__pycache__/libvirt* %changelog