From: Jeremy Sowden Date: Mon, 31 Jul 2023 11:40:24 +0000 (+0100) Subject: py: add pyproject.toml to support PEP-517-compatible build-systems X-Git-Tag: v1.0.9~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e603e0f7eec7c0000344a004228a30fbf0ece5c;p=thirdparty%2Fnftables.git py: add pyproject.toml to support PEP-517-compatible build-systems This makes it possible to build and install the module without directly invoking setup.py which has been deprecated. Retain the setup.py script for backwards-compatibility. Update INSTALL to mention the new config-file. Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- diff --git a/INSTALL b/INSTALL index 9b626745..53021e5a 100644 --- a/INSTALL +++ b/INSTALL @@ -86,7 +86,8 @@ Installation instructions for nftables CPython bindings are available for nftables under the py/ folder. - setup.py is provided to install it. + A pyproject.toml config file and legacy setup.py script are provided to install + it. Source code =========== diff --git a/py/Makefile.am b/py/Makefile.am index 974539fd..76aa082f 100644 --- a/py/Makefile.am +++ b/py/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = setup.cfg setup.py src +EXTRA_DIST = pyproject.toml setup.cfg setup.py src diff --git a/py/pyproject.toml b/py/pyproject.toml new file mode 100644 index 00000000..fed528d4 --- /dev/null +++ b/py/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta"