From bb8f4c9531933f6228149b03ec71dfb1e536a6a551c476e9cac8a3d4aa4835c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:33:30 +0000 Subject: [PATCH] Accepting request 807637 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807637 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-louvain?expand=0&rev=12 --- python-python-louvain.changes | 5 +++++ python-python-louvain.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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