Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/6] host-python2 hard dependency
@ 2014-03-05 22:04 Samuel Martin
  2014-03-05 22:04 ` [Buildroot] [PATCH 1/6] python: rework python symlinks installation Samuel Martin
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Samuel Martin @ 2014-03-05 22:04 UTC (permalink / raw)
  To: buildroot

Hi all,


Recently, the autobuilders have triggered some host package failures caused by
an unmet host-python(2) dependency.

These failures happen when python3 is selected for the target; in such cases,
the host python is also python3. However, some packages indirectly require a
python2 interpreter available for the host because they have some build scripts
(crda, in a *.py script, uses m2crypto which can only be built for python2) or
use a build-system non-python3-compliant (all packages based on Scons).

This series intends to fix this issue.

First, Buildroot needs to be able to manage the python symlink installation.
The idea behind this is, in the host tree, the python symlink points to the
interpreter the same version as the one in the target tree.
So, we can have:
- if python(2) is installed in the target:
  $(HOST_DIR)/usr/bin/python -> python2
- if python3 is installed in the target:
  $(HOST_DIR)/usr/bin/python -> python3
  $(HOST_DIR)/usr/bin/python2 -> python2.7
This is done in the patches 1/6 and 2/6.

The 3rd patch enhance the python infrastructure to allow setting the host python
requirement for a package using the host-python-package infrastructure. This
patch adds a new variable *_FORCE_HOST_PYTHON to be set to the interpreter name
('python2' or 'python3'), which, if set, will take care of adding the right host
python dependency and using the right interpreter in the build/install commands.

The last 3 packages fix the wrong dependency, so the build failures. Note that,
crda explicitly depends on host-python, while this dependency is automatically
(implicitly) pulled in the python-m2crypto package via the *_FORCE_HOST_PYTHON
usage.


Yours,
Samuel


Samuel Martin (6):
  python: rework python symlinks installation
  python3: rework python symlinks installation
  pkg-python: support host-python dependency different from the python
    in the target
  scons: force host-python dependency to be python2
  python-m2crypto: requires host-python2
  crda: override python interperter

 docs/manual/adding-packages-python.txt             |  8 ++++
 ...file-allow-to-override-python-interpreter.patch | 34 +++++++++++++++
 package/crda/crda.mk                               |  8 +++-
 package/pkg-python.mk                              | 50 ++++++++++++++++++++--
 package/python-m2crypto/python-m2crypto.mk         | 10 +++--
 .../python/python-011-remove-python-symlink.patch  | 29 +++++++++++++
 package/python/python.mk                           | 32 ++++++++++++++
 package/python3/python3.mk                         |  9 ++++
 package/scons/scons.mk                             |  4 +-
 9 files changed, 175 insertions(+), 9 deletions(-)
 create mode 100644 package/crda/crda-0001-Makefile-allow-to-override-python-interpreter.patch
 create mode 100644 package/python/python-011-remove-python-symlink.patch

--
1.9.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-04-05 15:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 22:04 [Buildroot] [PATCH 0/6] host-python2 hard dependency Samuel Martin
2014-03-05 22:04 ` [Buildroot] [PATCH 1/6] python: rework python symlinks installation Samuel Martin
2014-03-29 11:05   ` Yann E. MORIN
2014-03-05 22:04 ` [Buildroot] [PATCH 2/6] python3: " Samuel Martin
2014-03-29 11:23   ` Yann E. MORIN
2014-03-05 22:04 ` [Buildroot] [PATCH 3/6] pkg-python: support host-python dependency different from the python in the target Samuel Martin
2014-03-29 11:47   ` Yann E. MORIN
2014-03-29 13:26     ` Thomas Petazzoni
2014-03-29 13:58       ` Yann E. MORIN
2014-03-05 22:04 ` [Buildroot] [PATCH 4/6] scons: force host-python dependency to be python2 Samuel Martin
2014-03-29 11:50   ` Yann E. MORIN
2014-03-05 22:04 ` [Buildroot] [PATCH 5/6] python-m2crypto: requires host-python2 Samuel Martin
2014-03-29 11:51   ` Yann E. MORIN
2014-03-05 22:04 ` [Buildroot] [PATCH 6/6] crda: override python interperter Samuel Martin
2014-03-29 11:56   ` Yann E. MORIN
2014-04-05 15:42 ` [Buildroot] [PATCH 0/6] host-python2 hard dependency Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox