14
0

Accepting request 1299209 from devel:languages:python

- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/request/show/1299209
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-py-cpuinfo?expand=0&rev=12
This commit is contained in:
2025-08-14 09:36:08 +00:00
committed by Git OBS Bridge
2 changed files with 21 additions and 1 deletions

View File

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

View File

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