From 4c26fc16622a7921d88b4c4359250572a23e8911df14e02ff1c128f007bdfc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 25 Aug 2025 13:52:50 +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-sqlparse?expand=0&rev=42 --- python-sqlparse.changes | 5 +++++ python-sqlparse.spec | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/python-sqlparse.changes b/python-sqlparse.changes index 6b86b9f..b2efc41 100644 --- a/python-sqlparse.changes +++ b/python-sqlparse.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 25 13:52:31 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Mon Feb 24 10:02:41 UTC 2025 - Dirk Müller diff --git a/python-sqlparse.spec b/python-sqlparse.spec index 40c1c2b..4f47cb2 100644 --- a/python-sqlparse.spec +++ b/python-sqlparse.spec @@ -1,7 +1,7 @@ # # spec file for package python-sqlparse # -# Copyright (c) 2025 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-sqlparse Version: 0.5.3 @@ -31,9 +36,14 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif %python_subpackages %description @@ -59,6 +69,9 @@ chmod -x sqlparse/cli.py %postun %python_uninstall_alternative sqlformat +%pre +%python_libalternatives_reset_alternative sqlformat + %check %pytest