diff --git a/python-hatch.changes b/python-hatch.changes index aff423c..6950566 100644 --- a/python-hatch.changes +++ b/python-hatch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:15 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun Apr 5 07:19:23 UTC 2020 - Tomáš Chvátal diff --git a/python-hatch.spec b/python-hatch.spec index 3e020de..26f883a 100644 --- a/python-hatch.spec +++ b/python-hatch.spec @@ -64,6 +64,8 @@ Requires: python-twine >= 1.9.1 Requires: python-userpath >= 1.3.0 Requires: python-virtualenv Requires: python-wheel >= 0.27.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -80,6 +82,7 @@ It aims to make the 90% use cases as pleasant as possible. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/hatch %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -88,10 +91,16 @@ export PATH=$PATH:%{buildroot}%{_bindir} # test_list_success_1 randomly timeouts in OBS %pytest -k 'not test_list_success_1' +%post +%python_install_alternative hatch + +%postun +%python_uninstall_alternative hatch + %files %{python_files} %doc README.rst %license LICENSE-APACHE LICENSE-MIT -%python3_only %{_bindir}/hatch +%python_alternative %{_bindir}/hatch %{python_sitelib}/* %changelog