This commit is contained in:
parent
f351e22c4f
commit
dd35a886f8
@ -1316,6 +1316,28 @@ chrpath --delete %{buildroot}%{_libdir}/%{name}/program/librasqal-lo.so.3
|
||||
# Generate python cache files
|
||||
%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/program/
|
||||
%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/share/extensions/
|
||||
# pyuno links to pysitedir
|
||||
%{python_type} -m compileall %{buildroot}/%{python3_sitelib}
|
||||
|
||||
# Move python cache to respective filelist
|
||||
for i in file-lists/*.txt; do
|
||||
if [ `cat "${i}" | grep py |wc -l` -gt 0 ]; then
|
||||
cat "${i}" | grep py > pyfiles.txt
|
||||
for j in `cat pyfiles.txt`; do
|
||||
# python3 has __pycache__ dir while py2 does not
|
||||
%if %{with newmedia}
|
||||
pydir="${j%/*}"
|
||||
pyname="${j##*/}"
|
||||
echo "%dir ${pydir}/__pycache__/" >> "${i}"
|
||||
echo "${pydir}/__pycache__/${pyname%.*}*.pyc" >> "${i}"
|
||||
%else
|
||||
# just add c to state pyc
|
||||
echo "${j}c" >> "${i}"
|
||||
%endif
|
||||
done
|
||||
fi
|
||||
done
|
||||
rm pyfiles.txt
|
||||
|
||||
# We have ton of duped files so run over it
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
|
Loading…
x
Reference in New Issue
Block a user