About Python version

classic Classic list List threaded Threaded
6 messages Options
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

About Python version

Hello,

I gave a try to tdf#103363 (MAILMERGE: Outgoing mailserver (set in Tools > Options > Writer > Mail merge Email) not found), there's some problem with idna encoding.

I tried to add "import encodings.idna" + replace
self.server = smtplib.SMTP(server, port,timeout=tout)
by
self.server = smtplib.SMTP(encodings.idna.ToUnicode(server), port,timeout=tout)
but retrieved this error:
Python exception: <class 'ImportError'>: No module named 'unicodedata' (or 'unicodedata.ucd_3_2_0' is unknown), traceback follows
  File "/home/julien/lo/libreoffice/instdir/program/pythonloader.py", line 136, in activate
    mod = self.getModuleFromUrl( locationUrl )
  File "/home/julien/lo/libreoffice/instdir/program/pythonloader.py", line 114, in getModuleFromUrl
    mod =  __import__( dependent )
  File "/home/julien/lo/libreoffice/instdir/program/uno.py", line 347, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "/home/julien/lo/libreoffice/instdir/program/mailmerge.py", line 21, in <module>
    import encodings.idna

So I wonder what Python version should be used for LO master sources?
I used --enable-python=internal but my config.log displays some 2.7 ref, see https://bugs.documentfoundation.org/show_bug.cgi?id=103363#c15

When reading this link
https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies
I find Python 2 and 3 refs.

I also read that MSVC 2013 needed Python 3.3, for the others 3.5 in configure.ac (see http://opengrok.libreoffice.org/xref/core/configure.ac#8266)

Any thoughts?

Julien
jan iversen jan iversen
Reply | Threaded
Open this post in threaded view
|

Re: About Python version

> So I wonder what Python version should be used for LO master sources?
> I used --enable-python=internal but my config.log displays some 2.7 ref, see
> https://bugs.documentfoundation.org/show_bug.cgi?id=103363#c15
>
I had build problems on osx sierra, due to the fact that I installed Python3 (official) alongside the apple 2.7 version.

tml_ helped me solve the problem, which boiled down to use:
--enable-python=fullyinternal

When I used =internal I got a mixture of 2.7 and 3.5 header files.

This is clearly something that needs to be adressed in configure.ac and is on my list (but that is a long list).

Rgds
Jan I.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Khaled Hosny Khaled Hosny
Reply | Threaded
Open this post in threaded view
|

Re: About Python version

CONTENTS DELETED
The author has deleted this message.
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: About Python version

In reply to this post by jan iversen
On 17/12/2016 16:22, jan iversen wrote:

>> So I wonder what Python version should be used for LO master sources?
>> I used --enable-python=internal but my config.log displays some 2.7 ref, see
>> https://bugs.documentfoundation.org/show_bug.cgi?id=103363#c15
>>
> I had build problems on osx sierra, due to the fact that I installed Python3 (official) alongside the apple 2.7 version.
>
> tml_ helped me solve the problem, which boiled down to use:
> --enable-python=fullyinternal
>
> When I used =internal I got a mixture of 2.7 and 3.5 header files.
>
> This is clearly something that needs to be adressed in configure.ac and is on my list (but that is a long list).
Thank you for your feedback Jan, I'll give it a try.
BTW, it seems the right option is "fully-internal" since I can read this
on configure.ac:
    1172 AC_ARG_ENABLE(python,
    1173
AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
jan iversen jan iversen
Reply | Threaded
Open this post in threaded view
|

Re: About Python version

> BTW, it seems the right option is "fully-internal" since I can read this on configure.ac:
>   1172 AC_ARG_ENABLE(python,
>   1173 AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],
yes it is, sorry was not at my computer when I wrote the reply.

rgds
jan I.

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Bjoern Michaelsen Bjoern Michaelsen
Reply | Threaded
Open this post in threaded view
|

Re: About Python version

In reply to this post by jan iversen
Hi,

On Sat, Dec 17, 2016 at 04:22:53PM +0100, jan iversen wrote:
> When I used =internal I got a mixture of 2.7 and 3.5 header files.

So, unless we use =internal for release builds -- which looking at
distro-configs/LibreOfficeMacOSX.conf does not seem to be the case -- configure
should just barf up on this configure flag on OSX. If someone complains, we
should read that as a volunteer asking to be the maintainer for that build
scenario.

> This is clearly something that needs to be adressed in configure.ac and is on
> my list (but that is a long list).

FWIW, no need to overengineer here -- just make configure abort on OSX for this
and say its not supported.

Best,

Bjoern
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice