From: Nathan Cutler Date: Wed, 24 Jan 2018 04:51:05 +0000 (+0100) Subject: build/ops: rpm: python3-ceph-argparse only if Python 2 available X-Git-Tag: v13.0.2~431^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0b7aab381c7232eb81eb023c7fe5242ef6517a1;p=ceph.git build/ops: rpm: python3-ceph-argparse only if Python 2 available The python3-ceph-argparse package is only necessary in environments where Python 3 might not be available. For distros where Python 3 has become standard with Python 2 an optional extension (instead of vice versa as in the current status quo), the files in this package can (and should) be included in ceph-common directly. Signed-off-by: Nathan Cutler --- diff --git a/ceph.spec.in b/ceph.spec.in index ac506360b68f..aa729377f194 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -780,6 +780,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea This package contains Python 3 libraries for interacting with Cephs distributed file system. +%if 0%{with python2} %package -n python%{python3_pkgversion}-ceph-argparse Summary: Python 3 utility libraries for Ceph CLI %if 0%{?suse_version} @@ -790,6 +791,7 @@ 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. +%endif %if 0%{with ceph_test_package} %package -n ceph-test @@ -1232,8 +1234,15 @@ fi %config %{_sysconfdir}/bash_completion.d/radosgw-admin %config(noreplace) %{_sysconfdir}/ceph/rbdmap %{_unitdir}/rbdmap.service +%if 0%{with python2} %{python_sitelib}/ceph_argparse.py* %{python_sitelib}/ceph_daemon.py* +%else +%{python3_sitelib}/ceph_argparse.py +%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* +%{python3_sitelib}/ceph_daemon.py +%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* +%endif %dir %{_udevrulesdir} %{_udevrulesdir}/50-rbd.rules %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ @@ -1762,11 +1771,13 @@ fi %{python3_sitelib}/ceph_volume_client.py %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* +%if 0%{with python2} %files -n python%{python3_pkgversion}-ceph-argparse %{python3_sitelib}/ceph_argparse.py %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* %{python3_sitelib}/ceph_daemon.py %{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* +%endif %if 0%{with ceph_test_package} %files -n ceph-test