Move python bindings to python folder to simplify import

This commit is contained in:
Denis Silakov 2015-05-28 17:19:52 +03:00
parent f8c7cd9bfb
commit 863db42ef3

View file

@ -46,7 +46,7 @@ Version: 4.4.3
%if "%{beta}" != ""
Release: 0.%{beta}.1
%else
Release: 2
Release: 3
%endif
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
Group: Office
@ -3458,6 +3458,23 @@ sed -i '/^ProgressPosition/d;/^ProgressSize/d' \
echo 'ProgressPosition=10,307' >> %{buildroot}%{ooodir}/program/sofficerc
echo 'ProgressSize=377,9' >> %{buildroot}%{ooodir}/program/sofficerc
# move python bits into site-packages
mkdir -p %{buildroot}/%{py3_platsitedir}
pushd %{buildroot}/%{py3_platsitedir}
echo "import sys, os" > uno.py
echo "sys.path.append('%{ooodir}/program')" >> uno.py
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py
cat %{buildroot}%{ooodir}/program/uno.py >> uno.py
rm -f %{buildroot}%{ooodir}/program/uno.py*
mv -f %{buildroot}%{ooodir}/program/unohelper.py* .
mv -f %{buildroot}%{ooodir}/program/officehelper.py* .
popd
sed -i 's|%{ooodir}/program/uno.py|%{py3_platsitedir}/uno.py|' file-lists/pyuno_list.txt
sed -i 's|%{ooodir}/program/unohelper.py|%{py3_platsitedir}/unohelper.py|' file-lists/pyuno_list.txt
sed -i 's|%{ooodir}/program/officehelper.py|%{py3_platsitedir}/officehelper.py|' file-lists/pyuno_list.txt
# common shouldn't depend on writer...
# but common does depend on libswdlo.so
grep libswdlo.so file-lists/writer_list.txt >>file-lists/common_list.txt