1
0

- 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
This commit is contained in:
Daniel Garcia 2022-11-11 09:45:13 +00:00 committed by Git OBS Bridge
parent 34be5b9f8b
commit 15cb704aab
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Nov 11 09:43:10 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- 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 <yarunachalam@suse.com>

View File

@ -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