From 2d48f1cd3a1e88bf4e06d21ff27882f6085e9f1bb8c7418b8e5523fc96b4b107 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 25 May 2020 08:14:38 +0000 Subject: [PATCH] Accepting request 808637 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808637 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-mailman?expand=0&rev=25 --- python-mailman.changes | 5 +++++ python-mailman.spec | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/python-mailman.changes b/python-mailman.changes index b99d999..be635a1 100644 --- a/python-mailman.changes +++ b/python-mailman.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:41 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Apr 24 07:26:05 UTC 2020 - Tomáš Chvátal diff --git a/python-mailman.spec b/python-mailman.spec index 20b3caa..9e055a0 100644 --- a/python-mailman.spec +++ b/python-mailman.spec @@ -63,6 +63,8 @@ Requires: python-zope.component Requires: python-zope.configuration Requires: python-zope.event Requires: python-zope.interface >= 5.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: mailman = %{version} BuildArch: noarch %if %{with test} @@ -124,6 +126,9 @@ sed '/importlib_resources/d' -i src/mailman.egg-info/requires.txt setup.py %install %if !%{with test} %python_install +%python_clone -a %{buildroot}%{_bindir}/master +%python_clone -a %{buildroot}%{_bindir}/mailman +%python_clone -a %{buildroot}%{_bindir}/runner %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -152,12 +157,22 @@ sed -i "s:\(902\):4\1:" src/mailman/testing/testing.cfg %endif %if !%{with test} +%post +%python_install_alternative master +%python_install_alternative mailman +%python_install_alternative runner + +%postun +%python_uninstall_alternative master +%python_uninstall_alternative mailman +%python_uninstall_alternative runner + %files %{python_files} %doc README.rst %license COPYING -%python3_only %{_bindir}/runner -%python3_only %{_bindir}/mailman -%python3_only %{_bindir}/master +%python_alternative %{_bindir}/runner +%python_alternative %{_bindir}/mailman +%python_alternative %{_bindir}/master %{python_sitelib}/* %endif