openoffice-pyuno and external python programs
Caolan McNamara
caolanm at redhat.com
Tue Oct 16 12:17:08 UTC 2007
On Tue, 2007-10-16 at 13:06 +0200, Zoltan Kota wrote:
> Hi,
>
> The openoffice.org-pyuno package installs uno.py and other files
> under /usr/lib/openoffice.org/program/, so with the default installations
> and settings importing uno.py from external python programs gives an
> import error. Program specific patches could be used probably to add this
> 'strange' path to pythonpath, but wouldn't be better to make available
> these moduls for python at the openoffice level? See below what debian
> does.
> Any thoughts, ideas?
Hmm, what does
readelf -d /usr/lib/python2.4/site-packages/pyuno.so | grep RPATH
say on debian ? Is there an absolute entry in there so get it to find
the libraries it needs ?
One work-around might be to stick this at the top of the python program
import sys
import distutils.sysconfig
sys.path.append(distutils.sysconfig.get_config_var('LIBDIR') + \
'/openoffice.org/program')
import uno
C.
>
> Zoltan
>
> ---------- Forwarded message ----------
> Date: Wed, 12 Sep 2007 23:18:19 +0200 (CEST)
> From: Zoltan Kota <z.kota at gmx.net>
> Reply-To: Development discussions related to Fedora
> <fedora-devel-list at redhat.com>
> To: Fedora devel <fedora-devel-list at redhat.com>
> Subject: openoffice-pyuno and external python programs
>
> Hi,
>
> Files from openoffice.org-pyuno are installed under
> /usr/lib/openoffice.org2.0. So, 'import uno' from python gives an import
> error. How should we support external programs to use this module? Should
> we patch the program to import uno.py from this directory
> somehow? Or would be better to change the installation path in the
> openoffice.org-pyuno package?
> Debian for instance installs
> /usr/share/pycentral/python-uno/site-packages/uno.py
> /usr/share/pycentral/python-uno/site-packages/unohelper.py
> /usr/lib/python2.4/site-packages/pyuno.so
>
>
> Zoltan
>
More information about the fedora-devel-list
mailing list