Re: openoffice-pyuno and external python programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> Reply-To: Development discussions related to Fedora
>     <fedora-devel-list@xxxxxxxxxx>
> To: Fedora devel <fedora-devel-list@xxxxxxxxxx>
> 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
> 

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux