[oe] [meta-oe][PATCH] libgpiod: Enable python3 in default packageconfig

Adrian Bunk bunk at stusta.de
Wed Aug 28 05:22:34 UTC 2019


On Tue, Aug 27, 2019 at 06:14:36PM -0700, Khem Raj wrote:
> this recipe inherits python3native class conditionally, this condition
> depends on a given packageconfig, however inherit ${VAR} syntax requires
> VAR to be evaluated before inheriting it, therefore if someone appends
> python3 to packageconfig via a bbappend, then the packageconfig will
> become effective and add --enable-bindings-python to configure but
> inherit wont evaluate correctly since the expression adding to
> packageconfig
> 
> PACKAGECONFIG_append = " python3"
> 
> will be coming _after_ the inherit, and the builds will fail e.g.
> 
> | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory
> |  #include <Python.h>
> 
> This patch inverts the logic, meaning if someone has to disable python3
> bindings should write a bbappend e.g.
> 
> PACKAGECONFIG_remove = "python3"
> 
> This will still mean that python3native will be inherited but the
> effective configure option will be --disable-bindings-python and that
> will do the right thing
>...
>  # enable tools and cxx bindings
> -PACKAGECONFIG ?= "cxx tools"
> +PACKAGECONFIG ?= "cxx tools python3"
>...

It looks very fragile to me when a PACKAGECONFIG has this kind of 
unexpected side effects.

If I understand it correctly, for solving the problem you want 
python3native always inherited. And the simple way to do this would
be to make the inherit unconditionally without touching PACKAGECONFIG.

Anything I miss here?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the Openembedded-devel mailing list