From e242b443283f0fd0f11b6de2b15ca1e4ff36bac302d828d0844d1ee02efbb70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 09:21:43 +0000 Subject: [PATCH] Accepting request 808645 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808645 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-modernize?expand=0&rev=6 --- python-modernize.changes | 5 +++++ python-modernize.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-modernize.changes b/python-modernize.changes index bf6ec53..745b406 100644 --- a/python-modernize.changes +++ b/python-modernize.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:49 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Jan 7 11:37:57 UTC 2020 - Tomáš Chvátal diff --git a/python-modernize.spec b/python-modernize.spec index ab8dc50..3535ccc 100644 --- a/python-modernize.spec +++ b/python-modernize.spec @@ -28,6 +28,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-dbm +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module dbm} @@ -46,15 +48,22 @@ A hack on top of 2to3 for modernizing Python code. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/python-modernize %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative python-modernize + +%postun +%python_uninstall_alternative python-modernize + %files %{python_files} %doc CHANGELOG.rst README.rst %license LICENSE -%python3_only %{_bindir}/python-modernize +%python_alternative %{_bindir}/python-modernize %{python_sitelib}/* %changelog