17
0

1 Commits

Author SHA256 Message Date
ae6d60845c Convert to libalternatives, bsc#1245883 2025-11-03 14:50:26 +01:00
2 changed files with 31 additions and 11 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
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>
- Convert to pip-based build and libalternatives
-------------------------------------------------------------------
Tue May 14 19:03:10 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-ini2toml
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,6 @@
%define psuffix %{nil}
%bcond_with test
%endif
%bcond_with ringdisabled
# | Ring1 | Factory |
# ringdisabled | x | |
@@ -39,6 +38,7 @@
%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400
%bcond_without ringdisabled
%endif
%bcond_with experimental
%if %{with ringdisabled}
%bcond_with full
%bcond_with all
@@ -46,9 +46,11 @@
%bcond_without full
%bcond_without all
%endif
%bcond_with experimental
%define skip_python2 1
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-ini2toml%{psuffix}
Version: 0.15
Release: 0
@@ -56,12 +58,21 @@ Summary: Automatic conversion of .ini/cfg files to TOML equivalents
License: MPL-2.0
URL: https://github.com/abravalheri/ini2toml/
Source: https://files.pythonhosted.org/packages/source/i/ini2toml/ini2toml-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
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}
BuildRequires: %{python_module packaging >= 20.7}
BuildRequires: %{python_module pytest}
@@ -75,17 +86,13 @@ BuildRequires: %{python_module ini2toml-full = %{version}}
%if %{with all}
BuildRequires: %{python_module ini2toml-all = %{version}}
%endif
%if %{with full} || %{with all}
BuildRequires: %{python_module ConfigUpdater}
%endif
%if %{with experimental}
BuildRequires: %{python_module ini2toml-experimental = %{version}}
%endif
%endif
BuildRequires: fdupes
BuildArch: noarch
%python_subpackages
%description
@@ -146,10 +153,10 @@ sed -i 's/--cov ini2toml --cov-report term-missing//' setup.cfg
%if !%{with test}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/ini2toml
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -186,6 +193,9 @@ donttest=(-k "not test_auto_formatting")
%postun
%python_uninstall_alternative ini2toml
%pre
%python_libalternatives_reset_alternative ini2toml
%if !%{with test}
%files %{python_files}
%doc AUTHORS.rst CHANGELOG.rst README.rst