buildrootschalter/docs
Samuel Martin 05754fa01d pkg-python: support host-python dependency different from the python in the target
Some packages need a host-python interpreter with a version different
from the one installed in the target to run some build scripts (eg.
scons requires python2 to run, to build any kind of packages even if
the python interpreter selected for the target is python3).

In such cases, we need to add the right host-python dependency to the
package using the host-python-package infrastructure, and we also want
to invoke the right host python interpreter during the build steps.

This patch adds a *_NEEDS_HOST_PYTHON variable that can be set either
to 'python2' or 'python3'. This variable can be set by any package
using the host-python-package infrastructure to force the python
interpreter for the build. This variable also takes care of setting
the right host-python dependency.

This *_NEEDS_HOST_PYTHON variable only affects packages using the
host-python-package infrastructure.

If some configure/build/install commands are overloaded in the *.mk
file, the right python interpreter should be explicitly called.

If the package defines some tool variable (eg.: SCONS), the variable
should explicitly call the right python interpreter.

[Thomas:
 - fixes to the commit log and documentation suggested by Yann
 - rename the variable from <pkg>_FORCE_HOST_PYTHON to
   <pkg>_NEEDS_HOST_PYTHON, as suggested by Yann
 - do not allow any other value than python2 and python3 in
   <pkg>_NEEDS_HOST_PYTHON, as suggested by Yann.]

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-05 16:38:25 +02:00
..
css website: add Bootstrap and JQuery frameworks 2014-03-03 21:40:47 +01:00
images website: Add a Google+ presence 2014-03-28 22:48:01 +01:00
js website: add Buildroot javascript 2014-03-03 21:40:50 +01:00
manual pkg-python: support host-python dependency different from the python in the target 2014-04-05 16:38:25 +02:00
about.html website: new website ! 2014-03-03 21:40:50 +01:00
contribute.html website: new website ! 2014-03-03 21:40:50 +01:00
copyright.txt trivial: update buildroot e-mail address to buildroot@buildroot.org 2014-02-12 20:39:15 +01:00
docs.html docs/docs.html: use @buildroot.org for the mailing list 2014-03-18 09:12:16 +01:00
download.html website: new website ! 2014-03-03 21:40:50 +01:00
favicon.ico docs: add favicon / robots.txt 2011-04-04 22:21:47 +02:00
footer.html website: new website ! 2014-03-03 21:40:50 +01:00
git.html website: new website ! 2014-03-03 21:40:50 +01:00
header.html website: Add a Google+ presence 2014-03-28 22:48:01 +01:00
index.html docs/index.html: make recent git/email headers links to cgit/gmane 2014-03-16 22:02:45 +01:00
news.html website: new website ! 2014-03-03 21:40:50 +01:00
robots.txt docs: add favicon / robots.txt 2011-04-04 22:21:47 +02:00
sponsors.html website: new website ! 2014-03-03 21:40:50 +01:00
support.html website: new website ! 2014-03-03 21:40:50 +01:00