Hi Theodoros,

In data mercoledì 30 ottobre 2013 19:01:41, Theodoros Theodoropoulos ha 
scritto:
> I happened to compile invenio with LibreOffice 4.x
> (--with-openoffice-python=/opt/libreoffice4.0/program/python) but it
> seems that versions 4.x contain python 3.x, and thus
> /opt/invenio/bin/inveniounoconv cannot run properly (there are important
> changes in print becoming print() and in exceptions).
> (I now remember hitting that same wall in the past too, but...)

Yes. Unfortunately for the time being only LibreOffice 3.x is supported...
 
> The question is:
> What do I have to do to 'tell' invenio to use LibreOffice 3.6 python
> WITHOUT COMPILING EVERYTHING from source again? (don't ask...)

:-O

> What I tried already:
> I changed "CFG_PATH_OPENOFFICE_PYTHON =
> /opt/libreoffice3.6/program/python" inside invenio-autotools.conf
> and rerun inveniocfg --update-all
> Now inveniocfg --list conains the correct OFFICE_PYTHON path.

Perfect.

> FYI, I also changed the 1st line in /opt/invenio/bin/inveniounoconv to:
> #!/opt/libreoffice3.6/program/python

> But when executing /opt/invenio/bin/inveniounoconv, I STILL get the
> following error:
> Traceback (most recent call last):
>    File "/opt/invenio/bin/inveniounoconv", line 50, in <module>
>      from invenio.websubmit_file_converter import CFG_OPENOFFICE_TMPDIR
> ImportError: No module named invenio.websubmit_file_converter

Uh! I fear this is a regression due to the fact that recently on e.g. 
RHEL/CentOS and Ubuntu/Debian the LibreOffice python was the same of the 
system one...

Clearly here the problem is Invenio is not in the path of the LibreOffice's 
python...

What you can do as a quick workaround is to add right before the:

[...]
sys.path.append("/opt/invenio/lib/python")
from invenio.websubmit_file_converter import CFG_OPENOFFICE_TMPDIR
[...]

Hopefully this should be enough. If the LibreOffice Python and the regular 
Python have two different major version they will though keep on recompiling 
the .pyc files that inveniounoconv needs :-(
 
Hope this helps :-)

Cheers!
        Sam

-- 
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>
INSPIRE Service Manager ** <http://inspirehep.net/>

Reply via email to