Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#54250 - [libreoffice-fresh] Loading the python uno module fails
Attached to Project:
Arch Linux
Opened by Tomas Groth (tgc) - Thursday, 01 June 2017, 06:56 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 06 June 2017, 19:01 GMT
Opened by Tomas Groth (tgc) - Thursday, 01 June 2017, 06:56 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 06 June 2017, 19:01 GMT
|
DetailsDescription:
LibreOffice comes with a python uno module, but loading it fails in libreoffice-fresh. It works in libreoffice-still. The reason seems to be that the libreoffice-fresh PKGBUILD does not apply a patch that the libreoffice-still PKGBUILD does. The patch in question is make-pyuno-work-with-system-wide-module-install.diff Additional info: * package version(s): libreoffice-fresh 5.3.3-1 Steps to reproduce: $ python3 >>> import uno |
This task depends upon
Closed by Andreas Radke (AndyRTR)
Tuesday, 06 June 2017, 19:01 GMT
Reason for closing: Fixed
Additional comments about closing: 5.3.3-2
Tuesday, 06 June 2017, 19:01 GMT
Reason for closing: Fixed
Additional comments about closing: 5.3.3-2
https://cgit.freedesktop.org/libreoffice/core/commit/pyuno/source/module/uno.py?h=libreoffice-5-3&id=deb989dd6d1f86e74864131be50ed92d8d43768c
Modifying sys.path.append and os.putenv pointing to our install location seems to be required though. Fedora does something similar in their spec file:
# move python bits into site-packages
install -m 0755 -d %{buildroot}%{libo_python_sitearch}
pushd %{buildroot}%{libo_python_sitearch}
echo "import sys, os" > uno.py
echo "sys.path.append('%{baseinstdir}/program')" >> uno.py
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py
cat %{buildroot}%{baseinstdir}/program/uno.py >> uno.py
rm -f %{buildroot}%{baseinstdir}/program/uno.py*
mv -f %{buildroot}%{baseinstdir}/program/unohelper.py* .
mv -f %{buildroot}%{baseinstdir}/program/officehelper.py* .
popd
Debian removed the make-pyuno-work-with-system-wide-module-install.diff patch with their 5.3.x. update as well. No idea where they do necessary modifications now.
Please test modifying uno.py directly in your installation to make it load again.