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