From 8016ec84a98a482d15fb3a564a959fbf01821513887bdd2156cbd35ca5895478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 13:36:27 +0000 Subject: [PATCH] Accepting request 808747 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808747 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch?expand=0&rev=8 --- python-hatch.changes | 5 +++++ python-hatch.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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