Skip to content

Commit

Permalink
nftables: avoid python dependencies when building without python
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
michaelolbrich authored and kraj committed May 30, 2024
1 parent edaefe7 commit 5cf3766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta-networking/recipes-filter/nftables/nftables_1.0.9.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit 5cf3766

Please sign in to comment.