]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: Add packages for Python 3 bindings
authorOleh Prypin <oleh@pryp.in>
Tue, 9 Aug 2016 10:26:30 +0000 (13:26 +0300)
committerOleh Prypin <oleh@pryp.in>
Thu, 11 Aug 2016 13:36:57 +0000 (16:36 +0300)
Signed-off-by: Oleh Prypin <oleh@pryp.in>
ceph.spec.in

index 6fa56012726278b52c82b55e1480b825c2704176..6d7defb42b834b3402c152bcc62db5a64de1e0ba 100644 (file)
@@ -45,6 +45,7 @@
 
 %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
 %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
+%{!?python3_pkgversion: %global python3_pkgversion 3}
 
 # unify libexec for all targets
 %global _libexecdir %{_exec_prefix}/lib
@@ -154,6 +155,16 @@ BuildRequires:  openssl-devel
 BuildRequires:  redhat-lsb-core
 BuildRequires: Cython
 %endif
+# python34-... for RHEL, python3-... for all other supported distros
+%if 0%{?rhel}
+BuildRequires: python34-devel
+BuildRequires: python34-setuptools
+BuildRequires: python34-Cython
+%else
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-Cython
+%endif
 # lttng and babeltrace for rbd-replay-prep
 %if %{with lttng}
 %if 0%{?fedora} || 0%{?rhel}
@@ -399,13 +410,23 @@ This package contains libraries and headers needed to develop programs
 that use RADOS gateway client library.
 
 %package -n python-rados
-Summary:       Python libraries for the RADOS object store
+Summary:       Python libraries for the RADOS object store
 Group:         System Environment/Libraries
 License:       LGPL-2.0
 Requires:      librados2 = %{epoch}:%{version}-%{release}
 Obsoletes:     python-ceph < %{epoch}:%{version}-%{release}
 %description -n python-rados
-This package contains Python libraries for interacting with Cephs RADOS
+This package contains Python 2 libraries for interacting with Cephs RADOS
+object store.
+
+%package -n python%{python3_pkgversion}-rados
+Summary:       Python 3 libraries for the RADOS object store
+Group:         System Environment/Libraries
+License:       LGPL-2.0
+Requires:      python%{python3_pkgversion}
+Requires:      librados2 = %{epoch}:%{version}-%{release}
+%description -n python%{python3_pkgversion}-rados
+This package contains Python 3 libraries for interacting with Cephs RADOS
 object store.
 
 %package -n libradosstriper1
@@ -459,14 +480,24 @@ This package contains libraries and headers needed to develop programs
 that use RADOS block device.
 
 %package -n python-rbd
-Summary:       Python libraries for the RADOS block device
+Summary:       Python libraries for the RADOS block device
 Group:         System Environment/Libraries
 License:       LGPL-2.0
 Requires:      librbd1 = %{epoch}:%{version}-%{release}
 Requires:      python-rados = %{epoch}:%{version}-%{release}
 Obsoletes:     python-ceph < %{epoch}:%{version}-%{release}
 %description -n python-rbd
-This package contains Python libraries for interacting with Cephs RADOS
+This package contains Python 2 libraries for interacting with Cephs RADOS
+block device.
+
+%package -n python%{python3_pkgversion}-rbd
+Summary:       Python 3 libraries for the RADOS block device
+Group:         System Environment/Libraries
+License:       LGPL-2.0
+Requires:      librbd1 = %{epoch}:%{version}-%{release}
+Requires:      python%{python3_pkgversion}-rados = %{epoch}:%{version}-%{release}
+%description -n python%{python3_pkgversion}-rbd
+This package contains Python 3 libraries for interacting with Cephs RADOS
 block device.
 
 %package -n libcephfs1
@@ -497,16 +528,36 @@ This package contains libraries and headers needed to develop programs
 that use Cephs distributed file system.
 
 %package -n python-cephfs
-Summary:       Python libraries for Ceph distributed file system
+Summary:       Python libraries for Ceph distributed file system
 Group:         System Environment/Libraries
 License:       LGPL-2.0
 Requires:      libcephfs1 = %{epoch}:%{version}-%{release}
 Requires:      python-rados = %{epoch}:%{version}-%{release}
 Obsoletes:     python-ceph < %{epoch}:%{version}-%{release}
 %description -n python-cephfs
-This package contains Python libraries for interacting with Cephs distributed
+This package contains Python 2 libraries for interacting with Cephs distributed
+file system.
+
+%package -n python%{python3_pkgversion}-cephfs
+Summary:       Python 3 libraries for Ceph distributed file system
+Group:         System Environment/Libraries
+License:       LGPL-2.0
+Requires:      libcephfs1 = %{epoch}:%{version}-%{release}
+Requires:      python%{python3_pkgversion}-rados = %{epoch}:%{version}-%{release}
+%description -n python%{python3_pkgversion}-cephfs
+This package contains Python 3 libraries for interacting with Cephs distributed
 file system.
 
+%package -n python%{python3_pkgversion}-ceph-argparse
+Summary:       Python 3 utility libraries for Ceph CLI
+Group:         System Environment/Libraries
+License:       LGPL-2.0
+%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
+command-description information, validating user command input against those
+descriptions, and submitting the command to the appropriate daemon.
+
 %package -n ceph-test
 Summary:       Ceph benchmarks and test tools
 Group:         System Environment/Libraries
@@ -1265,6 +1316,12 @@ fi
 %{python_sitearch}/rados.so
 %{python_sitearch}/rados-*.egg-info
 
+#################################################################################
+%files -n python%{python3_pkgversion}-rados
+%defattr(-,root,root,-)
+%{python3_sitearch}/rados.cpython*.so
+%{python3_sitearch}/rados-*.egg-info
+
 #################################################################################
 %files -n libradosstriper1
 %defattr(-,root,root,-)
@@ -1337,6 +1394,12 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{python_sitearch}/rbd.so
 %{python_sitearch}/rbd-*.egg-info
 
+#################################################################################
+%files -n python%{python3_pkgversion}-rbd
+%defattr(-,root,root,-)
+%{python3_sitearch}/rbd.cpython*.so
+%{python3_sitearch}/rbd-*.egg-info
+
 #################################################################################
 %files -n libcephfs1
 %defattr(-,root,root,-)
@@ -1362,6 +1425,22 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{python_sitearch}/cephfs-*.egg-info
 %{python_sitelib}/ceph_volume_client.py*
 
+#################################################################################
+%files -n python%{python3_pkgversion}-cephfs
+%defattr(-,root,root,-)
+%{python3_sitearch}/cephfs.cpython*.so
+%{python3_sitearch}/cephfs-*.egg-info
+%{python3_sitelib}/ceph_volume_client.py
+%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
+
+#################################################################################
+%files -n python%{python3_pkgversion}-ceph-argparse
+%defattr(-,root,root,-)
+%{python3_sitelib}/ceph_argparse.py
+%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
+%{python3_sitelib}/ceph_daemon.py
+%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
+
 #################################################################################
 %files -n ceph-test
 %defattr(-,root,root,-)