From 5a0846631c1251abf500a51ed2abcdd842c42487 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Fri, 1 Mar 2019 13:54:07 +0100 Subject: [PATCH] rpm: put numpy and scipy deps in distro conditionals Without this patch, attempts to install the ceph-mgr-diskprediction-local RPM fail on SUSE platforms with the following error: can't install ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch: nothing provides numpy needed by ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch nothing provides scipy needed by ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch Also take into account package naming differences between Fedora and RHEL/CentOS. Signed-off-by: Kefu Chai Signed-off-by: Nathan Cutler --- ceph.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 0cf3e580936..95ea2c08fe7 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -493,8 +493,18 @@ BuildArch: noarch Group: System/Filesystems %endif Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version} +Requires: python%{_python_buildid}-numpy +%if 0%{without python2} +Requires: python3-scipy +%else +Requires: python2-scipy +%endif +%endif +%if 0%{?rhel} <= 7 Requires: numpy Requires: scipy +%endif %description mgr-diskprediction-local ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict disk failures using local algorithms and machine-learning databases.