From 8e603e0f7eec7c0000344a004228a30fbf0ece5c Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Mon, 31 Jul 2023 12:40:24 +0100 Subject: 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 --- INSTALL | 3 ++- py/Makefile.am | 2 +- py/pyproject.toml | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 py/pyproject.toml 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" -- cgit v1.2.3