From d84429e9f4a28355f320e0b385fe217880a5ec129d0f40c379118e245097e700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 26 Aug 2025 09:47:33 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlschema?expand=0&rev=60 --- python-xmlschema.changes | 5 +++++ python-xmlschema.spec | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/python-xmlschema.changes b/python-xmlschema.changes index 970b2de..4798ecc 100644 --- a/python-xmlschema.changes +++ b/python-xmlschema.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 26 09:44:55 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Fri Nov 15 08:28:45 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-xmlschema.spec b/python-xmlschema.spec index 881eff3..abdae35 100644 --- a/python-xmlschema.spec +++ b/python-xmlschema.spec @@ -1,7 +1,7 @@ # # spec file for package python-xmlschema # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-xmlschema Version: 3.4.3 @@ -34,9 +39,14 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-elementpath >= 3.0.0 Requires: python-lxml +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif %python_subpackages %description @@ -69,6 +79,11 @@ done export LANG="en_US.UTF8" %pytest tests/ +%pre +%python_libalternatives_reset_alternative xmlschema-json2xml +%python_libalternatives_reset_alternative xmlschema-validate +%python_libalternatives_reset_alternative xmlschema-xml2json + %post %python_install_alternative xmlschema-json2xml %python_install_alternative xmlschema-validate