Configure LO for Python 3?
Stephan Bergmann
sbergman at redhat.com
Thu Feb 16 07:27:46 PST 2012
On 02/16/2012 01:46 PM, Rene Engelhard wrote:
> On Thu, Feb 16, 2012 at 01:29:59PM +0100, Rene Engelhard wrote:
>> On Thu, Feb 16, 2012 at 01:08:48PM +0100, Stephan Bergmann wrote:
>>> With<http://cgit.freedesktop.org/libreoffice/core/commit/?id=a09ce46818fd4d5e08b3af9a478501cd8ef5b4fe>
>>> "Port PyUno to support Python 3," is there any way to configure a LO
>>> build so that it actually uses Python 3 instead of 2, on a Fedora 16
>>
>> You just point to it afaics. (you specify the correct python binary).
>> But never tried it myself. Default should be python2 anyway.
>
> That said, yes, you need to fix the pkg-config check to look for the
> correct .pc...
>
>> 1611 PATH=$(BUILD_PATH) PYTHON=$(PYTHON3) PYTHON_CFLAGS=$(shell pkg-config --cflags python-$(PY3MAJOR).$(PY3MINOR)mu) PYTHON_LIBS=$(shell pkg-config --libs python-$(PY3MAJOR).$(PY3MINOR)mu) \
>
> ... as here.
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.
Stephan
More information about the LibreOffice
mailing list