cross-compiling and python

2013-03-05 Thread Matúš Kukan
Hi,

there is currently only one configure option for python:
--enable-python=no/auto/system/internal

But we need python for more things and it seems to me like we would
need another one:
--enable-build-python=system/internal
because build-time python is used in filter/CustomTarget_svg.mk

Maybe it could work with only one option with implying:
--enable-python=system - --enable-build-python=system
--enable-python=internal - --enable-build-python=internal ? (we would
need to add python module to RepositoryModule_build.mk ?!)
--enable-python=no - --enable-build-python=system ?

Or maybe we could just always use system python when building ?
Is it available everywhere ? It should be on Linux, Cygwin.. how about Mac ?

Anyhow, configure is quite messy regarding python, or at least I was
not able to decipher all the conditionals easily.
Maybe I could use --disable-python for now but at least I will need to
fix few places to use system build-time python.

Thanks,
Matus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: cross-compiling and python

2013-03-05 Thread Tor Lillqvist
 --enable-build-python=system/internal

But we have a generic --with-build-platform-configure-options option
that can be used to pass several options to the sub-configury for the
build platform. Would it work to use:

--with-build-platform-configure-options=--enable-python=internal
--enable-whatever-else --with-something ?

We do have some leftover --with-system-foo-for-build options there but
they are obsolete. At least a comment says so. The generic
--with-build-platform-configure-options should hopefully be enough.

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: cross-compiling and python

2013-03-05 Thread Matúš Kukan
On 5 March 2013 12:38, Tor Lillqvist t...@iki.fi wrote:
 --enable-build-python=system/internal

 But we have a generic --with-build-platform-configure-options option
 that can be used to pass several options to the sub-configury for the
 build platform. Would it work to use:

 --with-build-platform-configure-options=--enable-python=internal
 --enable-whatever-else --with-something ?

No, this is not going to work.
I should have express myself better. This is not only about cross-compiling.
The problem is that for build platform you don't want to build pyuno
and all the other things. You only want to be able to execute python
when building. But configure checks for python = 3.3 for no good
reason I hope.
checking which Python to use... system
checking for a Python interpreter with version = 3.3... none
configure: error: no suitable Python interpreter found

--enable-build-python is supposed to be used also when not cross-compiling.
You may want to use --disable-python or --enable-python=internal but
still want system python for building.
I also don't like comment in
http://cgit.freedesktop.org/libreoffice/core/tree/configure.ac#n7303
and all the special handling of $build_os = cygwin

Hope it makes more sense now ?

Thanks,
Matus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: cross-compiling and python

2013-03-05 Thread Jan Holesovsky
Hi Matúš,

Matúš Kukan píše v Út 05. 03. 2013 v 13:12 +0100:

 I should have express myself better. This is not only about cross-compiling.
 The problem is that for build platform you don't want to build pyuno
 and all the other things. You only want to be able to execute python
 when building. But configure checks for python = 3.3 for no good
 reason I hope.
 checking which Python to use... system
 checking for a Python interpreter with version = 3.3... none
 configure: error: no suitable Python interpreter found

Having had a look at what is the python needed for during the build, and
it seems to me that it is only because of filter/source/svg/js2hxx.py .

Actually, this script is only there to be able to include
filter/source/svg/presentation_engine.js into a header file which we
then link to the code, and later just dump it again when exporting
presentation as svg.

So - I think best would be just to bundle presentation_engine.js to the
LO installation, and modify SVGFilter::implGenerateScript() [from
svxexport.cxx] so that it only reads presentation_engine.js from the
disk.  You'd kill the python-during-build dependency, and additionally
make the .so that contains it currently 500k smaller ;-)  How does that
sound?

Regards,
Kendy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: cross-compiling and python

2013-03-05 Thread Matúš Kukan
Hi Kendy,

On 5 March 2013 14:11, Jan Holesovsky ke...@suse.cz wrote:
 Having had a look at what is the python needed for during the build, and
 it seems to me that it is only because of filter/source/svg/js2hxx.py .
...
 So - I think best would be just to bundle presentation_engine.js to the
 LO installation, and modify SVGFilter::implGenerateScript() [from
 svxexport.cxx] so that it only reads presentation_engine.js from the
 disk.  You'd kill the python-during-build dependency, and additionally
 make the .so that contains it currently 500k smaller ;-)  How does that
 sound?

Not so easy unfortunately :-(
There is also filter/source/config/tools/merge/pyAltFCFGMerge
And don't forget nss/nsinstall.py

Any volunteers ?

But I don't think we need to get rid ourselves of python-build-time dependency.
Surely, at least on Linux and Windows, it is available.

Best,
Matus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: cross-compiling and python

2013-03-05 Thread d . ostrovsky

On Tue Mar 5 Matus Kukan wrote:

But I don't think we need to get rid ourselves of python-build-time  
dependency.

Surely, at least on Linux and Windows, it is available.

+1

Mac OS X 10.7.5 here:
david@wizball python --version
Python 2.7.1

so, i would say, just drop that feature of using internal python
as python-build-time dependency and always require system python
to be installed and fail loudly if it is not the case.

David

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice