]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph.spec.in: use python_provide macro
authorKefu Chai <kchai@redhat.com>
Thu, 10 Oct 2019 01:54:50 +0000 (09:54 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 10 Oct 2019 02:34:47 +0000 (10:34 +0800)
our python3 bindings are now named `python3-<modname>` after python3 is
now maintained by RHEL/CentOS instead EPEL. to help the users using
`python36-<modname>`, we should "Provide" `python36-<modname>`.

the `python_provide` macro is offered by `python-rpm-macros` package,
which is in turn required by python*-devel. and we do install
`python36-devel` in install-deps.sh, and install `python3-devel` in
ceph-*build/build/setup_rpm

see also
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in

index 2e5bed76f0547c7c27774c526be568861fce37f8..2fbed39a1bd43cc71dbf25d13d82bb31f50ab96d 100644 (file)
@@ -790,7 +790,7 @@ Group:              Development/Libraries/Python
 %endif
 Requires:      librgw2 = %{_epoch_prefix}%{version}-%{release}
 Requires:      python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
-Provides:      python3-rgw = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-rgw}
 %if 0%{without python2}
 Provides:      python-rgw = %{_epoch_prefix}%{version}-%{release}
 Obsoletes:     python-rgw < %{_epoch_prefix}%{version}-%{release}
@@ -819,7 +819,7 @@ Group:              Development/Libraries/Python
 %endif
 Requires:      python%{python3_pkgversion}
 Requires:      librados2 = %{_epoch_prefix}%{version}-%{release}
-Provides:      python3-rados = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-rados}
 %if 0%{without python2}
 Provides:      python-rados = %{_epoch_prefix}%{version}-%{release}
 Obsoletes:      python-rados < %{_epoch_prefix}%{version}-%{release}
@@ -910,7 +910,7 @@ Group:              Development/Libraries/Python
 %endif
 Requires:      librbd1 = %{_epoch_prefix}%{version}-%{release}
 Requires:      python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
-Provides:      python3-rbd = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-rbd}
 %if 0%{without python2}
 Provides:      python-rbd = %{_epoch_prefix}%{version}-%{release}
 Obsoletes:     python-rbd < %{_epoch_prefix}%{version}-%{release}
@@ -972,7 +972,7 @@ Group:              Development/Libraries/Python
 Requires:      libcephfs2 = %{_epoch_prefix}%{version}-%{release}
 Requires:      python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
 Requires:      python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
-Provides:      python3-cephfs = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs}
 %if 0%{without python2}
 Provides:      python-cephfs = %{_epoch_prefix}%{version}-%{release}
 Obsoletes:     python-cephfs < %{_epoch_prefix}%{version}-%{release}
@@ -999,7 +999,7 @@ Summary:    Python 3 utility libraries for Ceph CLI
 %if 0%{?suse_version}
 Group:         Development/Libraries/Python
 %endif
-Provides:   python3-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse}
 %description -n python%{python3_pkgversion}-ceph-argparse
 This package contains types and routines for Python 3 used by the Ceph CLI as
 well as the RESTful interface. These have to do with querying the daemons for
@@ -1022,7 +1022,7 @@ Summary:  Python 3 utility libraries for Ceph
 %if 0%{?suse_version}
 Group:         Development/Libraries/Python
 %endif
-Provides:   python3-ceph-common = %{_epoch_prefix}%{version}-%{release}
+%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-common}
 %description -n python%{python3_pkgversion}-ceph-common
 This package contains data structures, classes and functions used by Ceph.
 It also contains utilities used for the SSH orchestrator.