From 4712b0e59b5765774e0ee66e58b413a1c34b2fb7bde3b1dfa925b1bb31f514f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:28:30 +0000 Subject: [PATCH] Accepting request 807601 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807601 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-peewee?expand=0&rev=30 --- python-peewee.changes | 5 +++++ python-peewee.spec | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/python-peewee.changes b/python-peewee.changes index 3e884fc..80f562a 100644 --- a/python-peewee.changes +++ b/python-peewee.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:11 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Mar 18 16:01:40 UTC 2020 - Dirk Mueller diff --git a/python-peewee.spec b/python-peewee.spec index 800c608..a4fa8e9 100644 --- a/python-peewee.spec +++ b/python-peewee.spec @@ -38,6 +38,8 @@ BuildRequires: pkgconfig BuildRequires: python-rpm-macros BuildRequires: unzip BuildRequires: pkgconfig(sqlite3) +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -51,17 +53,23 @@ An expressive ORM that supports PostgreSQL, MySQL and SQLite. %install %python_install -%python_clone %{buildroot}%{_bindir}/pwiz.py +%python_clone -a %{buildroot}%{_bindir}/pwiz.py %python_expand %fdupes %{buildroot}%{$python_sitearch} %check %pytest_arch tests +%post +%python_install_alternative pwiz.py + +%postun +%python_uninstall_alternative pwiz.py + %files %{python_files} %license LICENSE %doc CHANGELOG.md README.rst TODO.rst %{_bindir}/pwiz.py-%{python_bin_suffix} -%python3_only %{_bindir}/pwiz.py +%python_alternative %{_bindir}/pwiz.py %{python_sitearch}/* %changelog