From f847db08d2c409dbec4bd3e5eec4d29753783a44b971bab06000a2c253bbdc39 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:46:45 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-python-dotenv.changes | 10 ++++++++++ python-python-dotenv.spec | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-python-dotenv.changes b/python-python-dotenv.changes index 71958c8..43cd9cf 100644 --- a/python-python-dotenv.changes +++ b/python-python-dotenv.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 14 13:01:31 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + +------------------------------------------------------------------- +Tue Jul 8 13:08:26 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Wed May 14 05:41:25 UTC 2025 - Steve Kowalik diff --git a/python-python-dotenv.spec b/python-python-dotenv.spec index 5384668..f3adcea 100644 --- a/python-python-dotenv.spec +++ b/python-python-dotenv.spec @@ -16,6 +16,12 @@ # +# rubygem-dotenv also provides executable dotenv +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-python-dotenv Version: 1.1.0 @@ -34,10 +40,14 @@ BuildRequires: %{python_module sh >= 2.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-click >= 5.0 -# rubygem-dotenv also provides executable dotenv +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif +Requires: python-click >= 5.0 Suggests: python-jupyter_ipython # There is a very similar Python package which also used `dotenv` namespace Conflicts: python-dotenv @@ -72,6 +82,9 @@ $python -m pytest -v -k "not ipython" } mv %{buildroot}%{_bindir}/dotenv.orig %{buildroot}%{_bindir}/dotenv +%pre +%python_libalternatives_reset_alternative dotenv + %post %python_install_alternative dotenv