]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
package *.py* files
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Tue, 17 Jan 2012 19:22:17 +0000 (17:22 -0200)
committerSage Weil <sage@newdream.net>
Wed, 25 Jan 2012 05:18:49 +0000 (21:18 -0800)
Some post-install rpmbuild defaults byte-compile all packaged python
files, so don't bother removing the .pyc files, and package .py* to
get both .pyo and .pyc.  It wastes a tiny little bit of space, but it
makes the spec file portable across a wider range of rpm and python
configurations.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicam.br>
Signed-off-by: Sage Weil <sage@newdream.net>
ceph.spec.in

index 3950fd1749237dc48cea325ebe076f5b816594da..d4994b51f46e07a54f8b9d605ff3cd9de183b7bf 100644 (file)
@@ -255,10 +255,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/tmp/
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph/
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/ceph/
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph/
-# remove *.pyc where *.pyo exists
-rm $RPM_BUILD_ROOT/%{python_sitelib}/rados.pyc
-rm $RPM_BUILD_ROOT/%{python_sitelib}/rbd.pyc
-rm $RPM_BUILD_ROOT/%{python_sitelib}/rgw.pyc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -351,12 +347,6 @@ fi
 %ghost %dir %{_localstatedir}/run/ceph/
 %dir %{_sysconfdir}/ceph/
 /usr/sbin/rcceph
-# not sure why I need to list those for CentOS although they're removed in install
-%if 0%{defined centos_version}
-%{python_sitelib}/rados.pyc
-%{python_sitelib}/rbd.pyc
-%{python_sitelib}/rgw.pyc
-%endif
 %{_libdir}/rados-classes/libcls_rbd.so.*
 %{_libdir}/rados-classes/libcls_rgw.so.*
 
@@ -483,11 +473,8 @@ fi
 #################################################################################
 %files -n python-ceph
 %defattr(-,root,root,-)
-%{python_sitelib}/rados.py
-%{python_sitelib}/rados.pyo
-%{python_sitelib}/rbd.py
-%{python_sitelib}/rbd.pyo
-%{python_sitelib}/rgw.py
-%{python_sitelib}/rgw.pyo
+%{python_sitelib}/rados.py*
+%{python_sitelib}/rbd.py*
+%{python_sitelib}/rgw.py*
 
 %changelog