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