From 51cb56ff718771b1b0f2cf6cdc4a63960225598ceb963505c8699173850d8ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 16 Jun 2025 14:28:15 +0000 Subject: [PATCH 1/2] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autopep8?expand=0&rev=72 --- python-autopep8.changes | 5 +++++ python-autopep8.spec | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/python-autopep8.changes b/python-autopep8.changes index a94f8de..3174564 100644 --- a/python-autopep8.changes +++ b/python-autopep8.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 16 14:27:55 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Jan 23 10:39:57 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-autopep8.spec b/python-autopep8.spec index fd7d0c1..da4287d 100644 --- a/python-autopep8.spec +++ b/python-autopep8.spec @@ -16,8 +16,8 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} - Name: python-autopep8 Version: 2.3.2 Release: 0 @@ -33,14 +33,14 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module tomli if %python-base < 3.11} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: python-rpm-macros +Requires: alts Requires: python-pycodestyle >= 2.12.0 +BuildArch: noarch %if %{python_version_nodots} < 311 Requires: python-tomli %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives -BuildArch: noarch %python_subpackages %description @@ -67,11 +67,8 @@ export LANG="en_US.UTF-8" # of the old binary resulting from the non-update-alternativies-ified package: [ -h %{_bindir}/autopep8 ] || rm -f %{_bindir}/autopep8 -%post -%python_install_alternative autopep8 - -%postun -%python_uninstall_alternative autopep8 +%pre +%python_libalternatives_reset_alternative autopep8 %files %{python_files} %license LICENSE From 447929ca058249c6c22a2410cc2ef6bb6976209b77476095bf006cd8500e8415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 19 Jun 2025 09:40:29 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autopep8?expand=0&rev=73 --- python-autopep8.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-autopep8.spec b/python-autopep8.spec index da4287d..d2adf62 100644 --- a/python-autopep8.spec +++ b/python-autopep8.spec @@ -66,8 +66,7 @@ export LANG="en_US.UTF-8" # Since /usr/bin/autopep8 became ghosted to be used with update-alternatives, we have to get rid # of the old binary resulting from the non-update-alternativies-ified package: [ -h %{_bindir}/autopep8 ] || rm -f %{_bindir}/autopep8 - -%pre +# now, let's convert the old update-alternatives link to libalternatives %python_libalternatives_reset_alternative autopep8 %files %{python_files}