Merge pull request #10894 from smithfarm/wip-suse-build-pycache

build/ops: force Python 3 packages to build in SUSE

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
This commit is contained in:
Nathan Cutler 2016-08-28 13:43:07 +02:00 committed by GitHub
commit 0775e71127

View File

@ -763,6 +763,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
%if 0%{?suse_version}
# create __pycache__ directories and their contents
%py3_compile %{buildroot}%{python3_sitelib}
%endif
%clean
rm -rf %{buildroot}
@ -1379,18 +1384,14 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%{python3_sitearch}/cephfs.cpython*.so
%{python3_sitearch}/cephfs-*.egg-info
%{python3_sitelib}/ceph_volume_client.py
%if ! 0%{?suse_version}
%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
%endif
%files -n python%{python3_pkgversion}-ceph-argparse
%defattr(-,root,root,-)
%{python3_sitelib}/ceph_argparse.py
%{python3_sitelib}/ceph_daemon.py
%if ! 0%{?suse_version}
%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
%{python3_sitelib}/ceph_daemon.py
%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
%endif
%files -n ceph-test
%defattr(-,root,root,-)