From: Jeremy Sowden <jeremy@azazel.net>
To: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH nft 0/3] Python Build Modernization
Date: Mon, 31 Jul 2023 12:40:21 +0100 [thread overview]
Message-ID: <20230731114024.2836892-1-jeremy@azazel.net> (raw)
Directly invoking setup.py to build and install a Python module is
deprecated:
https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
Pablo recently removed the autotooling which did this. This patch-set
updates the Python build configuration to add support for modern
alternatives while leaving the setup.py script around for users who may
need it.
The approach I have used is described here:
https://setuptools.pypa.io/en/latest/build_meta.html
We move the setuptools configuration out of setup.py into setup.cfg, and
then add a pyproject.toml configuration file to tell PEP-517 build tools
to use setuptools.
Setuptools also supports putting all its configuration into
pyproject.toml files:
https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
However, this is much more recent than its setup.cfg support (2022 vs
2016), which is why I decided to stick with the approach described
above.
Jeremy Sowden (3):
py: move package source into src directory
py: use setup.cfg to configure setuptools
py: add pyproject.toml to support PEP-517-compatible build-systems
INSTALL | 3 ++-
py/Makefile.am | 2 +-
py/pyproject.toml | 3 +++
py/setup.cfg | 24 ++++++++++++++++++++++++
py/setup.py | 23 ++---------------------
py/{ => src}/__init__.py | 0
py/{ => src}/nftables.py | 0
py/{ => src}/schema.json | 0
8 files changed, 32 insertions(+), 23 deletions(-)
create mode 100644 py/pyproject.toml
create mode 100644 py/setup.cfg
rename py/{ => src}/__init__.py (100%)
rename py/{ => src}/nftables.py (100%)
rename py/{ => src}/schema.json (100%)
--
2.40.1
next reply other threads:[~2023-07-31 11:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 11:40 Jeremy Sowden [this message]
2023-07-31 11:40 ` [PATCH nft 1/3] py: move package source into src directory Jeremy Sowden
2023-07-31 11:40 ` [PATCH nft 2/3] py: use setup.cfg to configure setuptools Jeremy Sowden
2023-07-31 11:40 ` [PATCH nft 3/3] py: add pyproject.toml to support PEP-517-compatible build-systems Jeremy Sowden
2023-08-03 7:46 ` [PATCH nft 0/3] Python Build Modernization Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230731114024.2836892-1-jeremy@azazel.net \
--to=jeremy@azazel.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).