[Buildroot] [PATCH 4/8] pkg-waf.mk: check host-python version
Trent Piepho
tpiepho at impinj.com
Tue Jan 2 22:27:54 UTC 2018
On Tue, 2018-01-02 at 10:28 -0500, Adam Duskett wrote:
>
> +# We need a host-python to run waf
> +ifeq ($(BR2_PACKAGE_HOST_PYTHON3),y)
> +$(2)_DEPENDENCIES += host-python3
> +$(2)_WAF_PYTHON_PATH ?= $$(HOST_DIR)/bin/python3
> +else
> +$(2)_DEPENDENCIES += host-python
> +$(2)_WAF_PYTHON_PATH ?= $$(HOST_DIR)/bin/python2
> +endif
PYTHON_PATH above is called PYLIBVER in the five existing definitions
of this variable. PYTHON_PATH already exists, and it the absolute
path in the target dir of sysconfigdata.
So it would be a lot more consistent to name this PYLIBVER.
It also seems like this variable will be re-created in a lot of
packages, if every package that needs to correctly call the host python
must define it. I wonder if there could be an easier way for python
package files to call the host python correctly. Like:
$(HOST_PYTHON_EXE) Program to run for host python, 2 or 3 as selected.
$(HOST_PYTHON2_EXE) If you must have python 2
$(HOST_PYTHON3_EXE) If you must have python 3
More information about the buildroot
mailing list