- compile python modules properly
authorwrobell <wrobell@pld-linux.org>
Thu, 22 Jul 2004 20:04:36 +0000 (20:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    drpython.spec -> 1.3

drpython.spec

index 9660859..6b81d08 100644 (file)
@@ -37,16 +37,19 @@ chmod 0644 *.py
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/drpython}
 
-python %{py_scriptdir}/compileall.pyc -l .
-
-install *.py[co] $RPM_BUILD_ROOT%{_datadir}/drpython
+install *.py $RPM_BUILD_ROOT%{_datadir}/drpython
 cp -a examples bitmaps $RPM_BUILD_ROOT%{_datadir}/drpython
 
 echo '#!/bin/sh' > $RPM_BUILD_ROOT%{_bindir}/drpython
 echo 'cd %{_datadir}/drpython' >> $RPM_BUILD_ROOT%{_bindir}/drpython
-echo 'exec python drpython.pyc' >> $RPM_BUILD_ROOT%{_bindir}/drpython
+echo 'exec python drpython.pyo' >> $RPM_BUILD_ROOT%{_bindir}/drpython
 chmod 0755 $RPM_BUILD_ROOT%{_bindir}/drpython
 
+%py_comp $RPM_BUILD_ROOT%{_datadir}/drpython
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/drpython
+
+find $RPM_BUILD_ROOT%{_datadir} -name \*.py | xargs rm -f
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.024704 seconds and 4 git commands to generate.