Skip to content

Commit 21a87a4

Browse files
QSchulzkraj
authored andcommitted
nftables: fix pep517-backend warning
nftables has a pyproject.toml file since v1.0.9, c.f. https://git.netfilter.org/nftables/commit/?id=8e603e0f7eec7c0000344a004228a30fbf0ece5c Styhead has started to complain when a recipe inherits setuptools3 and a proper pyproject.toml is provided in sources. This uses python_pep517 functions instead of the setuptools3 ones, inherits the proper class (still using setuptools3 but through pep517 process). Notably, the python PACKAGECONFIG has its build dependency on python3-setuptools-native removed as it's brought in by python_setuptools_build_meta inherit, which is performed whenever the python PACKAGECONFIG is selected. This avoids a "duplicate" but no change in behavior is expected. This was only build tested. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 990955b commit 21a87a4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

meta-networking/recipes-filter/nftables/nftables_1.1.0.bb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ PACKAGECONFIG[json] = "--with-json, --without-json, jansson"
2424
PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline"
2525
PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native"
2626
PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp"
27-
PACKAGECONFIG[python] = ",, python3-setuptools-native"
27+
PACKAGECONFIG[python] = ""
2828
PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise"
2929
PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables"
3030

3131
EXTRA_OECONF = " \
3232
${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}"
3333

34-
SETUPTOOLS_SETUP_PATH = "${S}/py"
34+
PEP517_SOURCE_PATH = "${S}/py"
3535

36-
inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}
36+
inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python_setuptools_build_meta', '', d)}
3737

3838
PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)}"
3939
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
@@ -44,21 +44,21 @@ RDEPENDS:${PN}-python = "python3-core python3-json ${PN}"
4444
do_configure() {
4545
autotools_do_configure
4646
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
47-
setuptools3_do_configure
47+
python_pep517_do_configure
4848
fi
4949
}
5050

5151
do_compile() {
5252
autotools_do_compile
5353
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
54-
setuptools3_do_compile
54+
python_pep517_do_compile
5555
fi
5656
}
5757

5858
do_install() {
5959
autotools_do_install
6060
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
61-
setuptools3_do_install
61+
python_pep517_do_install
6262
fi
6363
}
6464

0 commit comments

Comments
 (0)