14
0
forked from pool/python-tqdm

- Convert to libalternatives on SLE-16-based and newer systems

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=137
This commit is contained in:
2025-08-25 14:24:03 +00:00
committed by Git OBS Bridge
parent 60a4469309
commit 8ea85d93b1
2 changed files with 22 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 25 14:23:42 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems
-------------------------------------------------------------------
Thu Jan 9 13:01:25 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-tqdm
#
# 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
@@ -26,6 +26,11 @@
%define pkg_suffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-tqdm%{pkg_suffix}
Version: 4.67.1
@@ -42,15 +47,20 @@ BuildRequires: %{python_module toml}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Enhances: python-ipython
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module pytest-asyncio >= 0.24}
# Conditional required for SLE-15-SP4+
BuildRequires: %{python_module numpy if (python-base without python36-base)}
BuildRequires: %{python_module pytest-asyncio >= 0.24}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tqdm = %{version}}
@@ -106,6 +116,9 @@ install -m 644 -D tqdm/completion.sh %{buildroot}%{_datadir}/bash-completion/com
%postun
%python_uninstall_alternative tqdm
%pre
%python_libalternatives_reset_alternative tqdm
%endif
%if %{with test}