diff --git a/python-tld.changes b/python-tld.changes index 9bd3657..7615d17 100644 --- a/python-tld.changes +++ b/python-tld.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun May 3 13:19:42 UTC 2020 - Sebastian Wagner diff --git a/python-tld.spec b/python-tld.spec index 6bbb1a1..63a1c0f 100644 --- a/python-tld.spec +++ b/python-tld.spec @@ -33,6 +33,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools Requires: python-six >= 1.9 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Faker} @@ -57,15 +59,22 @@ A list of TLD names is taken from Mozillas public suffix list: %install %python_install +%python_clone -a %{buildroot}%{_bindir}/update-tld-names %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative update-tld-names + +%postun +%python_uninstall_alternative update-tld-names + %files %{python_files} %doc README.rst CHANGELOG.rst %license LICENSE_GPL2.0.txt LICENSE_LGPL_2.1.txt -%python3_only %{_bindir}/update-tld-names +%python_alternative %{_bindir}/update-tld-names %{python_sitelib}/* %changelog