From ca855d0dc1568258b49e592a27dc8b5682a63527c799b55d1eecf365335aa812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 20 Jan 2021 14:10:39 +0000 Subject: [PATCH] Accepting request 864700 from home:jayvdb:branches:devel:languages:python - Use python_alternative, fixing multi Python 3 builds OBS-URL: https://build.opensuse.org/request/show/864700 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PTable?expand=0&rev=4 --- python-PTable.changes | 5 +++++ python-PTable.spec | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/python-PTable.changes b/python-PTable.changes index 9723496..ca96d98 100644 --- a/python-PTable.changes +++ b/python-PTable.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 20 12:09:31 UTC 2021 - John Vandenberg + +- Use python_alternative, fixing multi Python 3 builds + ------------------------------------------------------------------- Sat May 9 12:50:20 UTC 2020 - andy great diff --git a/python-PTable.spec b/python-PTable.spec index d9ec4ab..e561b63 100644 --- a/python-PTable.spec +++ b/python-PTable.spec @@ -43,17 +43,24 @@ sed -i '1{/^#!/d}' prettytable/prettytable.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ptable %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # No tests available in package, github has no tags +%post +%python_install_alternative ptable + +%postun +%python_uninstall_alternative ptable + %files %{python_files} %doc CHANGELOG README.rst %license COPYING %dir %{python_sitelib}/prettytable/ %dir %{python_sitelib}/prettytable/__pycache__/ -%python3_only %{_bindir}/ptable +%python_alternative %{_bindir}/ptable %{python_sitelib}/PTable-%{version}-py%{python_version}.egg-info/ %{python_sitelib}/prettytable/*.py %pycache_only %{python_sitelib}/prettytable/__pycache__/*.pyc