forked from pool/python-ini2toml
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ini2toml?expand=0&rev=30
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 21 08:40:47 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 28 12:27:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Wed May 28 12:27:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%bcond_with ringdisabled
|
%bcond_with ringdisabled
|
||||||
# | Ring1 | Factory |
|
# | Ring1 | Factory |
|
||||||
# ringdisabled | x | |
|
# ringdisabled | x | |
|
||||||
@@ -39,6 +38,7 @@
|
|||||||
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
|
||||||
%bcond_without ringdisabled
|
%bcond_without ringdisabled
|
||||||
%endif
|
%endif
|
||||||
|
%bcond_with experimental
|
||||||
%if %{with ringdisabled}
|
%if %{with ringdisabled}
|
||||||
%bcond_with full
|
%bcond_with full
|
||||||
%bcond_with all
|
%bcond_with all
|
||||||
@@ -46,9 +46,11 @@
|
|||||||
%bcond_without full
|
%bcond_without full
|
||||||
%bcond_without all
|
%bcond_without all
|
||||||
%endif
|
%endif
|
||||||
%bcond_with experimental
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
Name: python-ini2toml%{psuffix}
|
Name: python-ini2toml%{psuffix}
|
||||||
Version: 0.15
|
Version: 0.15
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -60,10 +62,17 @@ BuildRequires: %{python_module pip}
|
|||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: alts
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
Requires: python-packaging >= 20.7
|
Requires: python-packaging >= 20.7
|
||||||
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module packaging >= 20.7}
|
BuildRequires: %{python_module packaging >= 20.7}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@@ -77,17 +86,13 @@ BuildRequires: %{python_module ini2toml-full = %{version}}
|
|||||||
%if %{with all}
|
%if %{with all}
|
||||||
BuildRequires: %{python_module ini2toml-all = %{version}}
|
BuildRequires: %{python_module ini2toml-all = %{version}}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with full} || %{with all}
|
%if %{with full} || %{with all}
|
||||||
BuildRequires: %{python_module ConfigUpdater}
|
BuildRequires: %{python_module ConfigUpdater}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with experimental}
|
%if %{with experimental}
|
||||||
BuildRequires: %{python_module ini2toml-experimental = %{version}}
|
BuildRequires: %{python_module ini2toml-experimental = %{version}}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildArch: noarch
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -182,6 +187,12 @@ donttest=(-k "not test_auto_formatting")
|
|||||||
%pytest "${ignoretests[@]}" "${donttest[@]}"
|
%pytest "${ignoretests[@]}" "${donttest[@]}"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative ini2toml
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative ini2toml
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative ini2toml
|
%python_libalternatives_reset_alternative ini2toml
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user