From b8301554d98ce7a01d360b6ad12cd7ebeb1c05bb6166d75d62b71a279a48803a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 May 2020 09:49:47 +0000 Subject: [PATCH] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proselint?expand=0&rev=17 --- python-proselint.changes | 5 +++++ python-proselint.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-proselint.changes b/python-proselint.changes index 966de0a..fd3de22 100644 --- a/python-proselint.changes +++ b/python-proselint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 6 09:49:35 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Mon Apr 20 10:51:03 UTC 2020 - Tomáš Chvátal diff --git a/python-proselint.spec b/python-proselint.spec index 8b549db..5b743ff 100644 --- a/python-proselint.spec +++ b/python-proselint.spec @@ -46,6 +46,8 @@ BuildRequires: %{python_module six} BuildRequires: python-mock %endif # /SECTION +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -67,15 +69,22 @@ sed -i -e '/^#!\//, 1d' proselint/*.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/proselint %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative proselint + +%postun +%python_uninstall_alternative proselint + %files %{python_files} %doc CHANGELOG.md README.md %license LICENSE.md -%python3_only %{_bindir}/proselint +%python_alternative %{_bindir}/proselint %{python_sitelib}/proselint/ %{python_sitelib}/proselint-%{version}-py*.egg-info