All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft 0/3] Python Build Modernization
@ 2023-07-31 11:40 Jeremy Sowden
  2023-07-31 11:40 ` [PATCH nft 1/3] py: move package source into src directory Jeremy Sowden
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jeremy Sowden @ 2023-07-31 11:40 UTC (permalink / raw)
  To: Netfilter Devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-03  7:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 11:40 [PATCH nft 0/3] Python Build Modernization Jeremy Sowden
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.