[Buildroot] [PATCH 3/8] python-setuptools: check host-python version

Trent Piepho tpiepho at impinj.com
Tue Jan 2 22:13:15 UTC 2018


On Tue, 2018-01-02 at 11:33 -0500, Adam Duskett wrote:
> python-setuptools is compatible with both python2 and python3, as such,
> there is no need to force python2 as a dependency.
> 
>  
> +ifeq ($(BR2_PACKAGE_HOST_PYTHON3),y)
> +HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON += python3
> +HOST_PYTHON_SETUPTOOLS_PYLIBVER = python$(PYTHON3_VERSION_MAJOR)
> +else
> +HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON += python
> +HOST_PYTHON_SETUPTOOLS_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
> +endif

From why I see in pkg-python, the default behavior for host packages is
to depend on the default interpreter, which is python3 if enabled
otherwise python2.  Isn't the above block basically doing the same
thing?  Other than using HOST_PYTHON3 rather than PYTHON3.

But shouldn't this be changed in pkg-python?

Then setting <PKG>_NEEDS_HOST_PYTHON based on why python version is in
use could be eliminated, unless the package needs a specific version,
which appear to be how it's supposed to work.


More information about the buildroot mailing list