From ebf6cd15a6f175d20cd68b27b86e93a3bccfefc9 Mon Sep 17 00:00:00 2001 From: liushi Date: Tue, 11 Feb 2020 14:26:31 +0800 Subject: [PATCH] ceph.spec.in: fix python3 dependencies in centos7 Fixes: https://tracker.ceph.com/issues/43737 Signed-off-by: liushi --- ceph.spec.in | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 99f19066884..33282647227 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -201,20 +201,31 @@ BuildRequires: librdkafka-devel %if 0%{with make_check} BuildRequires: jq BuildRequires: libuuid-devel +%if 0%{?rhel} == 7 +BuildRequires: python%{python3_version_nodots}-bcrypt +BuildRequires: python%{python3_version_nodots}-nose +%else BuildRequires: python%{python3_pkgversion}-bcrypt BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-pecan +%endif BuildRequires: python%{python3_pkgversion}-requests +%if 0%{?rhel} == 7 +BuildRequires: python%{python3_version_nodots}-six +BuildRequires: python%{python3_version_nodots}-virtualenv +%else BuildRequires: python%{python3_pkgversion}-six BuildRequires: python%{python3_pkgversion}-virtualenv +%endif %if 0%{?rhel} < 8 +BuildRequires: python%{python3_version_nodots}-coverage +%else BuildRequires: python%{python3_pkgversion}-coverage -BuildRequires: python%{python3_pkgversion}-tox %endif %if 0%{?rhel} == 7 -BuildRequires: pyOpenSSL%{python3_pkgversion} +BuildRequires: python%{python3_version_nodots}-pyOpenSSL %else -BuildRequires: python%{python3_pkgversion}-pyOpenSSL +BuildRequires: python%{python3_pkgversion}-pyOpenSSL %endif BuildRequires: socat %endif @@ -291,12 +302,21 @@ BuildRequires: xmlsec1-nss %endif BuildRequires: xmlsec1-openssl BuildRequires: xmlsec1-openssl-devel +%if 0%{?rhel} == 7 +BuildRequires: python%{python3_version_nodots}-jwt +BuildRequires: python%{python3_version_nodots}-scipy +%else BuildRequires: python%{python3_pkgversion}-cherrypy BuildRequires: python%{python3_pkgversion}-jwt BuildRequires: python%{python3_pkgversion}-routes BuildRequires: python%{python3_pkgversion}-scipy BuildRequires: python%{python3_pkgversion}-werkzeug -BuildRequires: python%{python3_pkgversion}-pyOpenSSL +%endif +%if 0%{?rhel} == 7 +BuildRequires: python%{python3_version_nodots}-pyOpenSSL +%else +BuildRequires: python%{python3_pkgversion}-pyOpenSSL +%endif %endif %if 0%{?suse_version} BuildRequires: libxmlsec1-1