Accepting request 1299067 from devel:languages:python

- Make the libalternatives transition conditional

OBS-URL: https://build.opensuse.org/request/show/1299067
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyproject-parser?expand=0&rev=5
This commit is contained in:
2025-08-13 14:23:06 +00:00
committed by Git OBS Bridge
2 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Aug 12 12:47:41 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Make the libalternatives transition conditional
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 27 15:03:31 UTC 2025 - Markéta Machová <mmachova@suse.com> Fri Jun 27 15:03:31 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -25,7 +25,11 @@
%bcond_with test %bcond_with test
%endif %endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
%if 0%{?suse_version} > 1500
%bcond_without libalternatives %bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-pyproject-parser%{psuffix} Name: python-pyproject-parser%{psuffix}
Version: 0.13.0 Version: 0.13.0
Release: 0 Release: 0
@@ -35,10 +39,8 @@ URL: https://github.com/repo-helper/pyproject-parser
Source: https://github.com/repo-helper/pyproject-parser/archive/refs/tags/v%{version}.tar.gz#/pyproject-parser-%{version}.tar.gz Source: https://github.com/repo-helper/pyproject-parser/archive/refs/tags/v%{version}.tar.gz#/pyproject-parser-%{version}.tar.gz
BuildRequires: %{python_module hatch-requirements-txt} BuildRequires: %{python_module hatch-requirements-txt}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-apeye-core >= 1.0.0 Requires: python-apeye-core >= 1.0.0
Requires: python-attrs >= 20.3.0 Requires: python-attrs >= 20.3.0
Requires: python-dom-toml >= 2.0.0 Requires: python-dom-toml >= 2.0.0
@@ -53,6 +55,13 @@ Suggests: python-docutils >= 0.16
Suggests: python-readme-renderer >= 27.0 Suggests: python-readme-renderer >= 27.0
Suggests: python-sdjson >= 0.3.1 Suggests: python-sdjson >= 0.3.1
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
# SECTION test requirements # SECTION test requirements
%if %{with test} %if %{with test}
BuildRequires: %{python_module coincidence} BuildRequires: %{python_module coincidence}
@@ -88,6 +97,12 @@ Parser for 'pyproject.toml'
%pre %pre
%python_libalternatives_reset_alternative pyproject-parser %python_libalternatives_reset_alternative pyproject-parser
%post
%python_install_alternative pyproject-parser check-pyproject pyproject-fmt pyproject-info
%postun
%python_uninstall_alternative pyproject-parser
%endif %endif
%check %check