From b8097c954c2453bba31a5b839e0ad1caf7ad87fc5969f87d90bbc3eca5dd07f3 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:31:50 +0000 Subject: [PATCH] Accepting request 808762 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808762 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=36 --- python-isort.changes | 5 +++++ python-isort.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-isort.changes b/python-isort.changes index c719935..9694aab 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:30 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sat Mar 14 08:32:17 UTC 2020 - Tomáš Chvátal diff --git a/python-isort.spec b/python-isort.spec index 37cd3f1..0d9c42f 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -37,6 +37,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-appdirs >= 1.4.0 Recommends: python-pip Recommends: python-pipreqs @@ -82,6 +84,7 @@ chmod -x LICENSE %install %if !%{with test} %python_install +%python_clone -a %{buildroot}%{_bindir}/isort %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -92,9 +95,15 @@ chmod -x LICENSE %endif %if !%{with test} +%post +%python_install_alternative isort + +%postun +%python_uninstall_alternative isort + %files %{python_files} %{python_sitelib}/isort* -%python3_only %{_bindir}/isort +%python_alternative %{_bindir}/isort %license LICENSE %endif