summaryrefslogtreecommitdiffstats
path: root/docs/manual/adding-packages-python.txt
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2014-03-05 23:04:42 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-05 16:38:25 +0200
commit05754fa01d1fef0e5c5120d954847573fdf9cbb4 (patch)
tree7cc73287c801e60ebecec166d994e66bac11e2ec /docs/manual/adding-packages-python.txt
parenta8127d3cf8296597c1f76215252efd12578a4e76 (diff)
downloadbuildroot-05754fa01d1fef0e5c5120d954847573fdf9cbb4.tar.gz
buildroot-05754fa01d1fef0e5c5120d954847573fdf9cbb4.zip
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>
Diffstat (limited to 'docs/manual/adding-packages-python.txt')
-rw-r--r--docs/manual/adding-packages-python.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/manual/adding-packages-python.txt b/docs/manual/adding-packages-python.txt
index b8d5331b1d..8f78f89973 100644
--- a/docs/manual/adding-packages-python.txt
+++ b/docs/manual/adding-packages-python.txt
@@ -144,6 +144,13 @@ therefore only use a few of them, or none.
setuptools packages) and +HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT+
(for host setuptools packages).
+* +HOST_PYTHON_FOO_NEEDS_HOST_PYTHON+, to define the host python
+ interpreter. The usage of this variable is limited to host
+ packages. The two supported value are +python2+ and +python3+. It
+ will ensures the right host python package is available and will
+ invoke it for the build. If some build steps are overloaded, the
+ right python interpreter must be explicitly called in the commands.
+
With the Python infrastructure, all the steps required to build and
install the packages are already defined, and they generally work well
for most Python-based packages. However, when required, it is still
OpenPOWER on IntegriCloud