diff --git a/python-python-louvain.changes b/python-python-louvain.changes index 4047cfe..45f4ad1 100644 --- a/python-python-louvain.changes +++ b/python-python-louvain.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:53 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jan 6 15:19:20 UTC 2020 - Todd R diff --git a/python-python-louvain.spec b/python-python-louvain.spec index 49d3dcb..18a50f7 100644 --- a/python-python-louvain.spec +++ b/python-python-louvain.spec @@ -33,6 +33,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-networkx Requires: python-numpy +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module networkx} @@ -56,15 +58,22 @@ sed -i -e '/^#!\//, 1d' community/__init__.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/community %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec test_community.py +%post +%python_install_alternative community + +%postun +%python_uninstall_alternative community + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/community +%python_alternative %{_bindir}/community %{python_sitelib}/* %changelog