nftables: avoid python dependencies when building without python

Use inherit_defer instead of inhert. This way, setuptools3 is not
inherited when python is removed from PACKAGECONFIG in a .bbappend file.
This avoids dependencies added by setuptools3.

Don't add nftables-python to PACKAGES if python is disabled. It adds
extra runtime dependencies on python3-core and python3-json.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Michael Olbrich 2024-05-29 11:58:51 +02:00 committed by Khem Raj
parent edaefe7f80
commit 5cf3766cf6
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -35,9 +35,9 @@ EXTRA_OECONF = " \
SETUPTOOLS_SETUP_PATH = "${S}/py"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}
inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}
PACKAGES =+ "${PN}-python"
PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)}"
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
RDEPENDS:${PN}-python = "python3-core python3-json ${PN}"