From d2b7b365f8cbb8b4e2907ff00057054ddf56c9ee87a1090dc00b12a7153597ad Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 24 Feb 2022 22:58:02 +0000 Subject: [PATCH] - Cleanup multi-version builds. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dmidecode?expand=0&rev=4 --- python-dmidecode.changes | 4 ++-- python-dmidecode.spec | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/python-dmidecode.changes b/python-dmidecode.changes index 504b5e7..21ca986 100644 --- a/python-dmidecode.changes +++ b/python-dmidecode.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- -Thu Feb 24 06:32:14 UTC 2022 - Matej Cepl +Thu Feb 24 22:57:21 UTC 2022 - Matej Cepl -- Fix package names. +- Cleanup multi-version builds. ------------------------------------------------------------------- Sat Dec 04 00:01:25 UTC 2021 - mcepl@cepl.eu diff --git a/python-dmidecode.spec b/python-dmidecode.spec index 6f037e1..de21d72 100644 --- a/python-dmidecode.spec +++ b/python-dmidecode.spec @@ -36,7 +36,13 @@ Patch2: detect-lib-with-py3.patch # use sys.version_info instead of sys.version Patch3: 31-version_info-v-version.patch BuildRequires: %{python_module devel} +%if 0%{?sle_version} >= 150400 BuildRequires: %{python_module libxml2} +%else +BuildRequires: %{oldpython}-libxml2-python +BuildRequires: %{oldpython}3-libxml2-python +%endif +BuildRequires: fdupes BuildRequires: libxml2-devel BuildRequires: python-rpm-macros %python_subpackages @@ -66,7 +72,9 @@ sed -i 's/python2/python3/g' Makefile unit-tests/Makefile } %install -%python_expand $python src/setup.py install --root %{buildroot} --prefix=%{_prefix} +%{python_expand $python src/setup.py install --root %{buildroot} --prefix=%{_prefix} +%fdupes %{buildroot}%{$python_sitearch} +} %check pushd unit-tests @@ -75,9 +83,12 @@ pushd unit-tests } popd +%clean + %files %license doc/LICENSE %doc README doc/README.upstream doc/AUTHORS doc/AUTHORS.upstream +%dir %{_datadir}/python-dmidecode/ %{_datadir}/python-dmidecode/ %files %{python_files python-dmidecode}