Skip to content

Commit

Permalink
libgpiod: nherit python3native unconditionally
Browse files Browse the repository at this point in the history
Source: meta-openembedded
MR: 00000
Type: Integration
Disposition: Merged from meta-openembedded
ChangeID: 98625eb
Description:

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 will still mean that python3native is always inherited but the
effective configure option will be --disable-bindings-python and that
will do the right thing

See. openembedded#140

Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Jeremy Puhlman <[email protected]>
  • Loading branch information
kraj authored and jpuhlman committed Sep 5, 2019
1 parent f9738c7 commit 2824309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"

PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}

inherit python3native

PACKAGES =+ "${PN}-python"
FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
Expand Down

0 comments on commit 2824309

Please sign in to comment.