From bab7a6a95c6ce89f5b8c847cd4ee2fe6c7ccc50be149f048613bd93190f658f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 May 2020 07:34:03 +0000 Subject: [PATCH] Accepting request 809553 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809553 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiosmtpd?expand=0&rev=5 --- python-aiosmtpd.changes | 5 +++++ python-aiosmtpd.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-aiosmtpd.changes b/python-aiosmtpd.changes index fc30e94..085cd76 100644 --- a/python-aiosmtpd.changes +++ b/python-aiosmtpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:02 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Jan 2 07:32:50 UTC 2020 - Tomáš Chvátal diff --git a/python-aiosmtpd.spec b/python-aiosmtpd.spec index 66fced5..d92cb96 100644 --- a/python-aiosmtpd.spec +++ b/python-aiosmtpd.spec @@ -33,6 +33,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-atpublic Requires: user(nobody) +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module atpublic} @@ -54,16 +56,23 @@ cp %{SOURCE1} . %install %python_install +%python_clone -a %{buildroot}%{_bindir}/aiosmtpd %python_expand rm -r %{buildroot}%{$python_sitelib}/examples %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative aiosmtpd + +%postun +%python_uninstall_alternative aiosmtpd + %files %{python_files} %doc README.rst %license LICENSE-2.0.txt -%python3_only %{_bindir}/aiosmtpd +%python_alternative %{_bindir}/aiosmtpd %{python_sitelib}/* %changelog