14
0
forked from pool/python-peewee

Accepting request 1300821 from devel:languages:python

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

OBS-URL: https://build.opensuse.org/request/show/1300821
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-peewee?expand=0&rev=36
This commit is contained in:
2025-08-21 18:32:48 +00:00
committed by Git OBS Bridge
2 changed files with 21 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 21 15:33:41 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Mon Jul 21 03:14:08 UTC 2025 - Steve Kowalik <steven.kowalik@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-peewee
Version: 3.18.2
@@ -32,13 +36,18 @@ BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: unzip
BuildRequires: pkgconfig(sqlite3)
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if 0%{?suse_version} > 1500
BuildRequires: %{python_module apsw}
%endif
@@ -65,6 +74,12 @@ sed -i -e '1{\@^#! *%{_bindir}.*python@d}' %{buildroot}%{$python_sitearch}/pwiz.
%check
%pytest_arch tests
%post
%python_install_alternative pwiz.py
%postun
%python_uninstall_alternative pwiz.py
%pre
%python_libalternatives_reset_alternative pwiz.py