From e99d69729fe20643584535455c49116e2fd2f50f9316e4c86b548a9d0e01d215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 10 Jul 2025 12:36:42 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch-fancy-pypi-readme?expand=0&rev=16 --- python-hatch-fancy-pypi-readme.changes | 5 +++++ python-hatch-fancy-pypi-readme.spec | 20 +++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/python-hatch-fancy-pypi-readme.changes b/python-hatch-fancy-pypi-readme.changes index 71b58c1..b192f07 100644 --- a/python-hatch-fancy-pypi-readme.changes +++ b/python-hatch-fancy-pypi-readme.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 10 12:36:07 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Fri May 2 04:56:24 UTC 2025 - Johannes Kastl diff --git a/python-hatch-fancy-pypi-readme.spec b/python-hatch-fancy-pypi-readme.spec index b260336..ef6e8ed 100644 --- a/python-hatch-fancy-pypi-readme.spec +++ b/python-hatch-fancy-pypi-readme.spec @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-hatch-fancy-pypi-readme%{psuffix} Version: 25.1.0 @@ -31,24 +32,24 @@ Release: 0 Summary: Fancy PyPI READMEs with Hatch License: MIT URL: https://github.com/hynek/hatch-fancy-pypi-readme -Source: https://files.pythonhosted.org/packages/source/h/hatch-fancy-pypi-readme/hatch_fancy_pypi_readme-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/h/hatch_fancy_pypi_readme/hatch_fancy_pypi_readme-%{version}.tar.gz BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-generators BuildRequires: python-rpm-macros +Requires: alts +Provides: python-hatch_fancy_pypi_readme = %{version}-%{release} +BuildArch: noarch +%{?python_enable_dependency_generator} %if %{with test} # SECTION test BuildRequires: %{python_module hatch-fancy-pypi-readme >= %version} BuildRequires: %{python_module pytest} # /SECTION %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives -Provides: python-hatch_fancy_pypi_readme = %{version}-%{release} -BuildArch: noarch -%{?python_enable_dependency_generator} %python_subpackages %description @@ -85,11 +86,8 @@ release? You've come to the right place! %pytest --ignore tests/test_end_to_end.py %endif -%post -%python_install_alternative hatch-fancy-pypi-readme - -%postun -%python_uninstall_alternative hatch-fancy-pypi-readme +%pre +%python_libalternatives_reset_alternative hatch-fancy-pypi-readme %if !%{with test} %files %{python_files}