forked from pool/python-peewee
Convert to libalternatives, bsc#1245883
This commit is contained in:
@@ -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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 20 11:21:04 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-peewee
|
||||
Version: 3.17.9
|
||||
@@ -26,9 +31,6 @@ URL: https://github.com/coleifer/peewee
|
||||
Source: https://github.com/coleifer/peewee/archive/refs/tags/%{version}.tar.gz#/peewee-%{version}.tar.gz
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module Flask}
|
||||
%if 0%{?suse_version} > 1500
|
||||
BuildRequires: %{python_module apsw}
|
||||
%endif
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -39,8 +41,16 @@ 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
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -70,6 +80,9 @@ sed -i -e '1{\@^#! *%{_bindir}.*python@d}' %{buildroot}%{$python_sitearch}/pwiz.
|
||||
%postun
|
||||
%python_uninstall_alternative pwiz.py
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative pwiz.py
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CHANGELOG.md README.rst TODO.rst
|
||||
|
||||
Reference in New Issue
Block a user