diff --git a/python-jsbeautifier.changes b/python-jsbeautifier.changes index 712b6b0..00924d7 100644 --- a/python-jsbeautifier.changes +++ b/python-jsbeautifier.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 16 11:59:13 UTC 2020 - pgajdos@suse.com diff --git a/python-jsbeautifier.spec b/python-jsbeautifier.spec index 512ab46..52b64ec 100644 --- a/python-jsbeautifier.spec +++ b/python-jsbeautifier.spec @@ -32,6 +32,8 @@ BuildRequires: python-rpm-macros Requires: python-EditorConfig >= 0.12.2 Requires: python-setuptools Requires: python-six >= 1.13.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module EditorConfig >= 0.12.2} @@ -52,15 +54,22 @@ cp %{SOURCE1} . %install %python_install +%python_clone -a %{buildroot}%{_bindir}/js-beautify %{python_expand %fdupes %{buildroot}%{$python_sitelib}} %check %pytest jsbeautifier/tests/testindentation.py %pytest jsbeautifier/tests/generated/tests.py +%post +%python_install_alternative js-beautify + +%postun +%python_uninstall_alternative js-beautify + %files %{python_files} %license LICENSE -%python3_only %{_bindir}/js-beautify +%python_alternative %{_bindir}/js-beautify %{python_sitelib}/jsbeautifier %{python_sitelib}/jsbeautifier-%{version}-py*.egg-info