From 15cb704aab2e8d616d0aa2b6ad6a09684be7a2fd173e44b3a874510ff0b4a470 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Fri, 11 Nov 2022 09:45:13 +0000 Subject: [PATCH] - Remove rpmlint errors: * Use postun instead of preun for update-alternatives * Remove shebang from py files * More specific python_sitelib in %files * Remove python_module macro definition OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=18 --- python-py-cpuinfo.changes | 9 +++++++++ python-py-cpuinfo.spec | 10 ++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/python-py-cpuinfo.changes b/python-py-cpuinfo.changes index 1100ac9..8f6c268 100644 --- a/python-py-cpuinfo.changes +++ b/python-py-cpuinfo.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Nov 11 09:43:10 UTC 2022 - Daniel Garcia + +- Remove rpmlint errors: + * Use postun instead of preun for update-alternatives + * Remove shebang from py files + * More specific python_sitelib in %files + * Remove python_module macro definition + ------------------------------------------------------------------- Wed Nov 9 18:28:08 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-py-cpuinfo.spec b/python-py-cpuinfo.spec index 58452b6..7e6004a 100644 --- a/python-py-cpuinfo.spec +++ b/python-py-cpuinfo.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without tests Name: python-py-cpuinfo Version: 9.0.0 @@ -30,7 +29,7 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(preun):update-alternatives +Requires(postun):update-alternatives BuildArch: noarch %python_subpackages @@ -53,6 +52,8 @@ These approaches are used for getting info: %prep %setup -q -n py-cpuinfo-%{version} +# remove shebang +sed -i '1{ /^#!/d; }' cpuinfo/*.py %build %python_build @@ -72,13 +73,14 @@ These approaches are used for getting info: %post %python_install_alternative cpuinfo -%preun +%postun %python_uninstall_alternative cpuinfo %files %{python_files} %license LICENSE %doc README.rst ChangeLog %python_alternative %{_bindir}/cpuinfo -%{python_sitelib}/* +%{python_sitelib}/cpuinfo +%{python_sitelib}/py_cpuinfo-%{version}*-info %changelog