From 7375e372f81d091a3dccf76bbbcbb1db45fdb8dbedbe210a2a594600c0e8867d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 10 Jul 2025 12:34:37 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch?expand=0&rev=48 --- python-hatch.changes | 5 +++++ python-hatch.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-hatch.changes b/python-hatch.changes index 8844d93..4301c80 100644 --- a/python-hatch.changes +++ b/python-hatch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 10 12:33:57 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Jun 26 09:36:32 UTC 2025 - Daniel Garcia diff --git a/python-hatch.spec b/python-hatch.spec index ecaf9e7..89d91ab 100644 --- a/python-hatch.spec +++ b/python-hatch.spec @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-hatch%{psuffix} Version: 1.14.1 @@ -41,10 +42,10 @@ BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module hatch-vcs >= 0.3} BuildRequires: %{python_module hatchling >= 1.26.3} BuildRequires: %{python_module pip} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires: alts Requires: git-core Requires: python-click >= 8.0.6 Requires: python-hatchling >= 1.21.0 @@ -135,11 +136,8 @@ donttest+=" or test_pyenv or test_no_open or test_open" %pytest -v -k "not ($donttest)" --ignore tests/cli/build/test_build.py %endif -%post -%python_install_alternative hatch - -%postun -%python_uninstall_alternative hatch +%pre +%python_libalternatives_reset_alternative hatch %if !%{with test} %files %{python_files}