Configure LO for Python 3?

Stephan Bergmann sbergman at redhat.com
Wed Feb 22 01:59:03 PST 2012


On 02/16/2012 04:27 PM, Stephan Bergmann wrote:
> For the record, adding
>
>> ##
>> ## Python 3
>> ## PYTHON_{CFLGS,LIBS}: pkg-config --{cflags,libs} python3
>> ##
>> --enable-python=system
>> PYTHON=/usr/bin/python3
>> PYTHON_CFLAGS=-I/usr/include/python3.2mu
>> PYTHON_LIBS=-lpython3.2mu
>> ##
>
> to autogen.lastrun did the trick for me, and
>
>> LD_LIBRARY_PATH=/data/lo/core/solver/unxlngx6/installation/opt/ure/lib \
>> UNO_PATH=/data/lo/core/solver/unxlngx6/installation/opt/program \
>> URE_BOOTSTRAP=vnd.sun.star.pathname:/data/lo/core/solver/unxlngx6/installation/opt/program/fundamentalrc
>> \
>> PYTHONPATH=/data/lo/core/solver/unxlngx6/installation/opt/program \
>> python3 -c 'import uno'
>
> worked without failure then.

And, once again for the record, the following works on Mac OS X (at 
least since 
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=b96b5aff2bfb4b0c4545e0a7f52679301dfcdb52> 
"Allow to override --with-python=system withh $PYTHON on Mac OS X"):

> Mac OS X 10.6.8
>
> MacPorts 2.0.3:
> $ /opt/local/bin/port install python23 +universal
>
> autogen.lastrun:
> --enable-python=system
> PYTHON=/opt/local/bin/python3.2
>
> $ DYLD_LIBRARY_PATH=/Users/stephan/Software/lo/core/solver/unxmacxi/installation/opt/LibreOffice.app/Contents/MacOS:/Users/stephan/Software/lo/core/solver/unxmacxi/installation/opt/LibreOffice.app/Contents/ure-link/lib UNO_PATH=/Users/stephan/Software/lo/core/solver/unxmacxi/installation/opt/LibreOffice.app/Contents/MacOS URE_BOOTSTRAP=/Users/stephan/Software/lo/core/solver/unxmacxi/installation/opt/LibreOffice.app/Contents/MacOS/fundamentalrc PYTHONPATH=/Users/stephan/Software/lo/core/solver/unxmacxi/installation/opt/LibreOffice.app/Contents/MacOS arch -i386 /opt/local/bin/python3.2 -c 'import uno'

Stephan



More information about the LibreOffice mailing list