Configure LO for Python 3?

Rene Engelhard rene at
Thu Feb 16 04:29:59 PST 2012


On Thu, Feb 16, 2012 at 01:08:48PM +0100, Stephan Bergmann wrote:
> With <>
> "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.

But if you want to do python2 and 3 in parallel, you need a hack. What I do here

1602 ifeq "$(BUILD_PYUNO)" "y"
1603   ifeq "$(ENABLE_PYTHON3)" "y"
1604         # FIXME: won't work when pyuno is migrated to gbuild as all is directly in solver
1605         # then...
1606         rm -rf $(SOURCE_TREE)/pyuno-py3
1607         cp -ra $(SOURCE_TREE)/pyuno $(SOURCE_TREE)/pyuno-py3
1608         cd $(SOURCE_TREE)/pyuno-py3; \
1609                 rm -rf $(shell . $(SOURCE_TREE)/; echo $$OUTPATH$$PROEXT); \
1610                 . $(CURDIR)/$(SOURCE_TREE)/; \
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) \
1612                 ../solenv/bin/  # NO DELIVER!
1613   endif
1614 endif

+ other stuff to reuse python2s files if the same and install python3
stuff manually.

(see;a=blob;f=rules;h=1a35e8ee8d0ff3de5d495a036197355b784269f1;hb=refs/heads/debian-experimental-3.5 and look for ENABLE_PYTHON3 stuff)



More information about the LibreOffice mailing list