From 88d21f48a474a2e268c5e667e05a3afd81a683f2234f1b242b756bf9e3cf303a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Sat, 19 Jul 2025 07:31:23 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycodestyle?expand=0&rev=47 --- python-pycodestyle.changes | 5 +++++ python-pycodestyle.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-pycodestyle.changes b/python-pycodestyle.changes index cc0f12e..49656ca 100644 --- a/python-pycodestyle.changes +++ b/python-pycodestyle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 19 07:30:53 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Sun Jul 13 12:35:54 UTC 2025 - Dirk Müller diff --git a/python-pycodestyle.spec b/python-pycodestyle.spec index c63e210..a6905a2 100644 --- a/python-pycodestyle.spec +++ b/python-pycodestyle.spec @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-pycodestyle Version: 2.14.0 @@ -29,10 +30,10 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires: alts Provides: python-pep8 = %{version} Obsoletes: python-pep8 < %{version} BuildArch: noarch @@ -58,11 +59,8 @@ sed -ri '1s/^#!.*//' pycodestyle.py %python_clone -a %{buildroot}%{_bindir}/pycodestyle %python_expand %fdupes %{buildroot}/%{$python_sitelib} -%post -%python_install_alternative pycodestyle - -%postun -%python_uninstall_alternative pycodestyle +%pre +%python_libalternatives_reset_alternative pycodestyle %check %pytest