From a31519278fa7a549d9629a400b2ca7f9e895d1960373074a2f4ae883d0f7fa95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 9 Jun 2025 15:09:03 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py-cpuinfo?expand=0&rev=24 --- python-py-cpuinfo.changes | 5 +++++ python-py-cpuinfo.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-py-cpuinfo.changes b/python-py-cpuinfo.changes index 6801830..8de5cea 100644 --- a/python-py-cpuinfo.changes +++ b/python-py-cpuinfo.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 9 15:08:49 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Jun 3 12:39:03 UTC 2025 - Markéta Machová diff --git a/python-py-cpuinfo.spec b/python-py-cpuinfo.spec index 03f893f..00fdb30 100644 --- a/python-py-cpuinfo.spec +++ b/python-py-cpuinfo.spec @@ -17,6 +17,7 @@ %bcond_without tests +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-py-cpuinfo Version: 9.0.0 @@ -29,10 +30,10 @@ 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 -Requires(post): alts -Requires(postun): alts +Requires: alts BuildArch: noarch %python_subpackages @@ -73,11 +74,8 @@ sed -i '1{ /^#!/d; }' cpuinfo/*.py %python_exec test_suite.py %endif -%post -%python_install_alternative cpuinfo - -%postun -%python_uninstall_alternative cpuinfo +%pre +%python_libalternatives_reset_alternative cpuinfo %files %{python_files} %license LICENSE