From a89e4e29d70eb613cbf6374b236eef480812b0df9707e62d37a82e9a385fc79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 14 Aug 2025 13:08:14 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems only OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-email-validator?expand=0&rev=26 --- python-email-validator.changes | 5 +++++ python-email-validator.spec | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/python-email-validator.changes b/python-email-validator.changes index 76d46c6..1dc3832 100644 --- a/python-email-validator.changes +++ b/python-email-validator.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 14 13:04:59 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + ------------------------------------------------------------------- Tue Jul 8 13:11:57 UTC 2025 - Markéta Machová diff --git a/python-email-validator.spec b/python-email-validator.spec index e5effb3..8aa2ff1 100644 --- a/python-email-validator.spec +++ b/python-email-validator.spec @@ -16,7 +16,11 @@ # +%if 0%{?suse_version} > 1500 %bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-email-validator Version: 2.2.0 @@ -35,15 +39,20 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 5.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: alts Requires: python-dnspython >= 1.15.0 Requires: python-idna >= 2.0.0 Provides: python-email_validator = %{version}-%{release} Obsoletes: python-email_validator < %{version}-%{release} BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %python_subpackages %description @@ -82,6 +91,12 @@ donttest="test_caching_dns_resolver" %pre %python_libalternatives_reset_alternative email_validator +%post +%python_install_alternative email_validator + +%postun +%python_uninstall_alternative email_validator + %files %{python_files} %license LICENSE %doc README.md