1 Commits

Author SHA256 Message Date
e372e6d207 Convert to libalternatives, bsc#1245883 2025-11-03 14:55:42 +01:00
2 changed files with 36 additions and 7 deletions

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Aug 21 09:59:03 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Mon Jun 9 14:18:09 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Mon Jun 2 14:35:21 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Mon Jul 10 16:16:15 UTC 2023 - ecsos <ecsos@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-natsort
#
# Copyright (c) 2023 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
@@ -16,6 +16,11 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-natsort
Version: 8.4.0
@@ -26,19 +31,25 @@ URL: https://github.com/SethMMorton/natsort
Source: https://files.pythonhosted.org/packages/source/n/natsort/natsort-%{version}.tar.gz
BuildRequires: %{python_module fastnumbers >= 5.0.1}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 4.3}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: help2man
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: python-PyICU >= 1.0.0
Recommends: python-fastnumbers >= 5.0.1
BuildArch: noarch
%{?sle15_python_module_pythons}
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
@@ -51,10 +62,10 @@ sorting based on meaning and not computer code point).
%autopatch -p1
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
export PYTHONPATH=%{buildroot}%{python_sitelib}
help2man -o natsort.1 -N %{buildroot}%{_bindir}/natsort
@@ -70,11 +81,14 @@ export LANG=en_US.UTF8
%pytest --hypothesis-profile=slow-tests
%post
%python_install_alternative natsort natsort.1
%python_install_alternative natsort
%postun
%python_uninstall_alternative natsort
%pre
%python_libalternatives_reset_alternative natsort
%files %{python_files}
%license LICENSE
%doc README.rst CHANGELOG.md