14
0
forked from pool/python-Faker

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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Faker?expand=0&rev=127
This commit is contained in:
2025-08-19 12:17:09 +00:00
committed by Git OBS Bridge
parent 8647724c30
commit 3ce537812d
2 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Aug 19 12:11:40 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Tue Jul 8 13:18:02 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -16,7 +16,11 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-Faker
Version: 26.1.0
@@ -32,14 +36,19 @@ BuildRequires: %{python_module python-dateutil >= 2.4}
BuildRequires: %{python_module text-unidecode >= 1.3}
BuildRequires: %{python_module validators >= 0.13.0}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-python-dateutil >= 2.4
Requires: python-text-unidecode >= 1.3
Obsoletes: python3-fake-factory < %{version}-%{release}
Provides: python3-fake-factory = %{version}-%{release}
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@@ -66,6 +75,12 @@ sed -i -e 's:==:>=:g' setup.py
%pre
%python_libalternatives_reset_alternative faker
%post
%python_install_alternative faker
%postun
%python_uninstall_alternative faker
%check
%pytest