kumquat-buildroot/docs/manual
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
..
adding-packages-autotools.txt manual: fix typo in abbreviation 'i.e.' 2014-03-29 09:30:50 +01:00
adding-packages-cmake.txt manual: remove package clean commands 2013-12-08 19:41:54 +01:00
adding-packages-conclusion.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
adding-packages-directory.txt manual: Add singular example for dependency comment 2014-03-29 09:08:04 +01:00
adding-packages-generic.txt manual: fix typo in abbreviation 'e.g.' 2014-03-29 09:30:35 +01:00
adding-packages-gettext.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
adding-packages-hooks.txt manual: add some info on the POST_RSYNC hook 2013-11-11 00:12:05 +01:00
adding-packages-luarocks.txt manual: adding packages luarocks 2014-01-13 23:18:48 +01:00
adding-packages-perl.txt manual: adding packages perl 2014-02-23 22:38:02 +01:00
adding-packages-python.txt pkg-python: support host-python dependency different from the python in the target 2014-04-05 16:38:25 +02:00
adding-packages-tips.txt manual/adding-packages-tips.txt: reword part about package name 2014-03-23 20:54:34 +01:00
adding-packages.txt manual: adding packages perl 2014-02-23 22:38:02 +01:00
advanced.txt docs/manual: document the usage of <pkg>_OVERRIDE_SRCDIR 2014-02-23 22:29:54 +01:00
appendix.txt manual: clarify handling of deprecated features 2014-01-21 21:56:46 +01:00
beyond-buildroot.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
ccache-support.txt ccache: expose control interface via 'make ccache-options' 2013-10-27 10:30:10 +01:00
common-usage.txt manual: fix typo in abbreviation 'e.g.' 2014-03-29 09:30:35 +01:00
configure.txt manual: fix typo in abbreviation 'i.e.' 2014-03-29 09:30:50 +01:00
contribute.txt manual/contribute.txt: reword part about reporting issues 2014-03-29 09:29:52 +01:00
customize-busybox-config.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
customize-kernel-config.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
customize-outside-br.txt manual: fix typo in abbreviation 'i.e.' 2014-03-29 09:30:50 +01:00
customize-packages.txt manual/customize-packages.txt: reword part about applying patches 2014-03-23 20:52:20 +01:00
customize-rootfs.txt infra: replace BUILDROOT_CONFIG with BR2_CONFIG 2014-02-09 17:00:13 +01:00
customize-store.txt docs: update manual after Crosstool-NG backend removal 2013-10-06 20:53:58 +02:00
customize-toolchain.txt toolchain/wrapper: rename BR_DEBUG_WRAPPER 2014-03-05 19:46:31 +01:00
customize-uclibc-config.txt uclibc: convert to the package infrastructure 2013-07-04 00:13:23 +02:00
customize.txt docs/manual: add explanations about BR2_EXTERNAL 2013-12-08 23:01:44 +01:00
debugging-buildroot.txt infra: replace BUILDROOT_CONFIG with BR2_CONFIG 2014-02-09 17:00:13 +01:00
developer-guide.txt pkg-infra: add user-supplied step-hooks 2013-11-13 00:27:26 +01:00
download-infra.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
download-location.txt infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR. 2014-02-09 11:02:42 +01:00
eclipse-integration.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
faq-troubleshooting.txt manual: fix typo in abbreviation 'i.e.' 2014-03-29 09:30:50 +01:00
get-involved.txt manual: update review process and patchwork 2013-10-14 23:16:22 +02:00
getting.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
going-further.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
how-buildroot-works.txt Remove STAMP_DIR 2014-03-17 22:10:45 +01:00
introduction.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
known-issues.txt manual/known-issues.txt: fix s/Soucery/Sourcery/ typo 2013-10-07 09:33:46 +02:00
legal-notice.txt manual/legal-notice.txt: fix typo 2014-03-29 09:30:02 +01:00
make-tips.txt manual/make-tips.txt: fix typo 2014-03-29 09:29:03 +01:00
makedev-syntax.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
makeusers-syntax.txt packages: add ability for packages to create users 2013-04-25 22:56:42 +02:00
manual.mk core: introduce the BR2_EXTERNAL variable 2013-12-08 22:38:13 +01:00
manual.txt manual: use current date/time for 'generated on' 2014-01-04 21:11:44 +01:00
package-make-target.txt docs/manual: mention the per-package graph-depends target 2014-02-23 22:30:14 +01:00
patch-policy.txt manual: update for multiple global patch dirs 2013-12-25 17:31:55 +01:00
prerequisite.txt docs/manual: Add version number to perl in prerequisites 2013-11-11 15:06:34 +01:00
rebuilding-packages.txt docs/manual: fix minor spelling/grammar mistakes 2014-02-24 11:10:59 +01:00
starting-up.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
using-buildroot-development.txt docs/manual: fix minor spelling/grammar mistakes 2014-02-24 11:10:59 +01:00
using-buildroot-toolchain.txt manual: cleanup and update editor tags 2013-02-17 22:50:04 +01:00
using.txt manual/using: output/toolchain is gone 2014-03-26 22:32:54 +01:00
working-with.txt working-with: board support 2013-02-28 22:37:49 +01:00
writing-rules.txt manual: remove suggestion of aligning = signs in .mk files 2014-01-22 21:46:13 +01:00