]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: rpm: python3-ceph-argparse only if Python 2 available
authorNathan Cutler <ncutler@suse.com>
Wed, 24 Jan 2018 04:51:05 +0000 (05:51 +0100)
committerNathan Cutler <ncutler@suse.com>
Fri, 26 Jan 2018 06:42:18 +0000 (07:42 +0100)
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 <ncutler@suse.com>
ceph.spec.in

index ac506360b68f3de4f71e63a74884d7238391032b..aa729377f1943adc74fecd4e033cdf24df856fea 100644 (file)
@@ -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