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] [PATCH v2 04/20] python3: make it exclusive from python
Date: Sat, 8 Oct 2016 14:24:34 +0200	[thread overview]
Message-ID: <20161008122434.GA3802@free.fr> (raw)
In-Reply-To: <20161005213018.7a5567da@free-electrons.com>

Thomas, Bernd, All,

On 2016-10-05 21:30 +0200, Thomas Petazzoni spake thusly:
> On Wed, 05 Oct 2016 20:00:40 +0200, Bernd Kuhls wrote:
> > sorry for warming up this old commit but I would like to ask whether it 
> > is possible at all to allow python2 and python3 together on the target?
> 
> No, this is not possible, because we have no way in kconfig to say
> which Python modules should be installed for python2, and which Python
> modules should be installed for python3.
> 
> So while having both interpreters and the Python standard library
> side-by-side would work, it doesn't work for all the external Python
> modules we have.

For what is worth, I've also been thinking on how we could solve this in
Buildroot. We've discussed this on IRC (with Romain or Samuel, I can't
remember). Here's what we came up with...

First, as Thomas said, we'd need to have the kcofnig-side sorted out.
When looking only at external python modules for themselves, it is not
very complex: we already have some modules depend on either python xor
python3 for those modules that have an explicit dependency.

Where it gets more complex is when a package needs a modules that works
only with python and another module that works only with python3. I
don't know if this situation is realistic, but we have to at least take
it in consideration.

Then, there is the problem of building modules for either or both of the
pythons, when those modules need compiling (e.g. are not written
entirely in python, but use C or whatever that needs compiling).

When a module is only python xor python3, this is realtively easy; we just
need to do a single build of that module. It does not change much from
what we currently have for that module.

But then, when the module is compatible with both python and python3,
then we need to build it twice, which is currently not supported by our
python-package infra, and is definitely not trivial to do.

Finally, comes the installation phase. Again, modules that are python
xor python3, this is mostly status-quo with what we currently have.

Modules that are compatible with both python and python3 would need to
be installed for both. Again, our python-package infra does not support
that, and it is far from trivial to do.

I've started looking into this, but I have absolutely no code to show. I
think it *might* be possible to come up with something, but that may
probably add quite a bit of complexity and uglyness in the python-package
infra. I'm not sure it would be worth the effort... :-/

> > I need python2 for Kodi, afaics[1] there are no current plans to support 
> > python3.
> 
> I think that's the main problem. Staying on python2 only is really not
> a wise choice.

Yes, this is a real pain... :-(

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:[~2016-10-08 12:24 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 20:39 [Buildroot] [PATCH v2 00/20] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
2014-02-18 20:39 ` [Buildroot] [PATCH v2 01/20] pkg-python: no longer use distutilscross for setuptools Thomas Petazzoni
2014-02-18 21:57   ` Peter Korsgaard
2014-02-18 20:39 ` [Buildroot] [PATCH v2 02/20] python-distutilscross: remove package that is no longer needed Thomas Petazzoni
2014-02-18 21:58   ` Peter Korsgaard
2014-02-18 20:39 ` [Buildroot] [PATCH v2 03/20] python3: removal of *.py/*.pyc is now done globally Thomas Petazzoni
2014-02-18 21:58   ` Peter Korsgaard
2014-02-18 20:39 ` [Buildroot] [PATCH v2 04/20] python3: make it exclusive from python Thomas Petazzoni
2014-02-18 21:58   ` Peter Korsgaard
2016-10-05 18:00   ` Bernd Kuhls
2016-10-05 19:30     ` Thomas Petazzoni
2016-10-08 12:24       ` Yann E. MORIN [this message]
2016-10-08 12:51         ` Thomas Petazzoni
2016-10-08 13:51           ` Yann E. MORIN
2016-10-08 14:02             ` Thomas Petazzoni
2016-10-08 15:57               ` Bernd Kuhls
2016-10-08 18:23                 ` Yegor Yefremov
2016-10-09  7:55                   ` Bernd Kuhls
2016-10-09  9:44                     ` Yegor Yefremov
2016-10-09 11:29                       ` Yegor Yefremov
2016-10-08 16:55               ` Yann E. MORIN
2014-02-18 20:39 ` [Buildroot] [PATCH v2 05/20] python3: add python -> python3 symlink for the host variant Thomas Petazzoni
2014-02-18 21:58   ` Peter Korsgaard
2014-02-18 20:39 ` [Buildroot] [PATCH v2 06/20] python3: add config directory symbolic link Thomas Petazzoni
2014-02-18 21:56   ` Peter Korsgaard
2014-02-18 22:17     ` Thomas Petazzoni
2014-02-18 22:21       ` Peter Korsgaard
2014-02-18 20:40 ` [Buildroot] [PATCH v2 07/20] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3 Thomas Petazzoni
2014-02-18 22:22   ` Peter Korsgaard
2014-02-18 20:40 ` [Buildroot] [PATCH v2 08/20] python3: bump to 3.4.0rc1 Thomas Petazzoni
2014-02-18 22:23   ` Peter Korsgaard
2014-02-18 20:40 ` [Buildroot] [PATCH v2 09/20] python3: provide a PYTHON3_PATH Thomas Petazzoni
2014-02-18 22:29   ` Peter Korsgaard
2014-02-18 22:33     ` Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 10/20] package: add python3 support in the package infrastructure Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 11/20] package: allow Python packages with Python3 Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 12/20] python, python3: enable unicodedata for host-python, needed by setuptools Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 13/20] python-setuptools: bump version to 2.1.2 Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 14/20] python, python3: fix to ensure libpython is stripped Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 15/20] python-pyasn: use the real upstream Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 16/20] python-bottle: allow to build with Python 3 Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 17/20] python-serial: " Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 18/20] python-pyasn: " Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 19/20] python-pycrypto: " Thomas Petazzoni
2014-02-18 20:40 ` [Buildroot] [PATCH v2 20/20] python-pysnmp{, -apps, -mibs}: " Thomas Petazzoni
2014-02-19  8:03 ` [Buildroot] [PATCH v2 00/20] Python 2 and 3 bumps, support for Python 3 external modules Peter Korsgaard
2014-02-19  8:23   ` Thomas Petazzoni

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=20161008122434.GA3802@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