forked from pool/python-py-cpuinfo
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=26
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 13 09:53:29 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 9 15:08:49 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
@@ -17,7 +17,11 @@
|
||||
|
||||
|
||||
%bcond_without tests
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-py-cpuinfo
|
||||
Version: 9.0.0
|
||||
@@ -30,10 +34,15 @@ Source: https://files.pythonhosted.org/packages/source/p/py-cpuinfo/py-c
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -77,6 +86,12 @@ sed -i '1{ /^#!/d; }' cpuinfo/*.py
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative cpuinfo
|
||||
|
||||
%post
|
||||
%python_install_alternative cpuinfo
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative cpuinfo
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst ChangeLog
|
||||
|
Reference in New Issue
Block a user