diff --git a/python-json5.changes b/python-json5.changes index d1e9b5b..06e4f13 100644 --- a/python-json5.changes +++ b/python-json5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:34 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 16 11:47:01 UTC 2020 - pgajdos@suse.com diff --git a/python-json5.spec b/python-json5.spec index ffd23ca..1a0a950 100644 --- a/python-json5.spec +++ b/python-json5.spec @@ -30,6 +30,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -52,16 +54,23 @@ slightly more usable as a configuration language: %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pyjson5 %python_expand rm -rf %{buildroot}%{$python_sitelib}/tests %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative pyjson5 + +%postun +%python_uninstall_alternative pyjson5 + %files %{python_files} %doc README.md %license LICENSE -%python3_only %{_bindir}/pyjson5 +%python_alternative %{_bindir}/pyjson5 %{python_sitelib}/* %changelog