Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2] package/kodi: needs .py modules
Date: Tue, 15 Sep 2015 22:03:53 +0200	[thread overview]
Message-ID: <20150915200353.GB3650@free.fr> (raw)
In-Reply-To: <55F8493C.2030804@mind.be>

Arnout, All,

On 2015-09-15 18:37 +0200, Arnout Vandecappelle spake thusly:
> On 13-09-15 23:13, Yann E. MORIN wrote:
> > Kodi segfaults as soon as it tries to load a python module:
> > 
> >     Could not find platform independent libraries <prefix>
> >     Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> >     ImportError: No module named site
> >     Segmentation fault
> > 
> > Turns out that keeping .py modules (with or without .pyc) fixes the
> > issue.
> > 
> > Currently, Kodi selects python, but since the format of modules is a
> > choice, we can not select it.
> 
>  I think it's a lot more user-friendly to do
> 
> 	select BR2_PACKAGE_PYTHON_PY_PYC

Two problems with that option:
  - first, it is not acceptable; one must *not* select a symbol that is
    part of a choice
  - Kconfig won't even act on that select, in fact:

    $ cat select-choice.in
    config FOO
        bool "foo"
        select BAR_B
    
    choice BAR
        bool "bar"
    
    config BAR_A
        bool "bar-a"
    
    config BAR_B
        bool "bar-b"
    
    config BAR_C
        bool "bar-c"
    
    endchoice

    $ cat .config
    #
    # Automatically generated file; DO NOT EDIT.
    # Configuration
    #
    CONFIG_FOO=y
    CONFIG_BAR_A=y
    # CONFIG_BAR_B is not set
    # CONFIG_BAR_C is not set

So, as you can see, even though FOO is set, BAR_B is not, even though
FOO selects it.

>  That removes the possibility for the user to select the PY_ONLY option, but I
> don't think that that's so terribly important. And it does make life a whole lot
> simpler for someone who wants to select Kodi. They already have to go and enable
> an EGL provider, so let's not make their life harder by requiring manual
> selection of python with the correct, non-default _PY_PYC option...

One alternative (if we are *that* concerned with user-friendliness),
would be to introduce an intermediate symbol that allows to get rid of
.py, something like:

    config BR2_PKG_PYTHON_WANTS_PY
        bool

    choice
        bool "module fomat"

    config BR2_PKG_PYTHON_PY_ONLY
        bool ".py only"

    config BR2_PKG_PYTHON_PYC_ONLY
        bool ".pyc only"
        depends on !BR2_PKG_PYTHON_WANTS_PY

    endchoice

(note: .py+.pyc option voluntarily omitted).

and then Kodi would select BR2_PKG_PYTHON_WANTS_PY.

But that's just ugly, even just for the sake of simplicity.

Regards,
Yann E. MORIN.


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-09-15 20:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 21:13 [Buildroot] [PATCHv2] package/kodi: needs .py modules Yann E. MORIN
2015-09-13 21:29 ` Thomas Petazzoni
2015-09-13 21:35   ` Yann E. MORIN
2015-09-19 12:40     ` Thomas Petazzoni
2015-09-19 15:47       ` Yann E. MORIN
2015-09-20  8:17         ` Thomas Petazzoni
2015-09-26 14:40   ` Bernd Kuhls
2015-09-15 16:37 ` Arnout Vandecappelle
2015-09-15 20:03   ` Yann E. MORIN [this message]
2015-09-15 20:52     ` Arnout Vandecappelle
2015-09-15 21:05       ` Yann E. MORIN
2015-12-05 20:38 ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150915200353.GB3650@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox