From d84a561f6bbc35be8d8cea2832109ab06ba0599ba1b506c255ceeac4332db792 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 4 Jun 2025 14:26:41 +0000 Subject: [PATCH] - Migrate to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-curlylint?expand=0&rev=8 --- python-curlylint.changes | 5 +++++ python-curlylint.spec | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python-curlylint.changes b/python-curlylint.changes index 0e1a81c..d3c2936 100644 --- a/python-curlylint.changes +++ b/python-curlylint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 4 14:26:00 UTC 2025 - Nico Krapp + +- Migrate to libalternatives + ------------------------------------------------------------------- Mon May 26 10:57:52 UTC 2025 - Markéta Machová diff --git a/python-curlylint.spec b/python-curlylint.spec index a2a558e..bb773a9 100644 --- a/python-curlylint.spec +++ b/python-curlylint.spec @@ -16,6 +16,7 @@ # +%bcond_without libalternatives Name: python-curlylint Version: 0.13.1 Release: 0 @@ -26,8 +27,10 @@ Source: https://files.pythonhosted.org/packages/source/c/curlylint/curly BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-attrs >= 17.2.0 Requires: python-click >= 6.5 Requires: python-parsy >= 1.1.0 @@ -48,7 +51,7 @@ BuildRequires: %{python_module toml >= 0.9.4} HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid. %prep -%setup -q -n curlylint-%{version} +%autosetup -p1 -n curlylint-%{version} %build %pyproject_wheel @@ -61,11 +64,11 @@ HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid. %check %pytest -%post -%python_install_alternative curlylint +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative curlylint -%postun -%python_uninstall_alternative curlylint +# post and postun macro call is not needed with only libalternatives %files %{python_files} %doc README.md