Hi there,

the nftables source package contains a python module (the python binding for libnftables).

Source code: https://salsa.debian.org/pkg-netfilter-team/pkg-nftables

Recently, and because python & setuptools deprecation issues, the python side of package that has been working for ages, is now broken.

nftables upstream has removed integration with autotools [1] (suggested by me), so we distro developers (me) should find the best way to install the package (autotools wont do it anymore), which apparently is the python way [0] WTH.

I have tested a number of approaches to replace the old simple method, while producing the exact same content in the resulting debian binary package:

/usr/lib/python3/dist-packages/nftables/__init__.py
/usr/lib/python3/dist-packages/nftables/nftables.py
/usr/lib/python3/dist-packages/nftables/schema.json
/usr/lib/python3/dist-packages/nftables-0.1-py3.11.egg-info

The approaches I tried include:
* using pybuild, which is regarded pretty much everywhere as a magic thing, but gets confused with the --with options passed to the autotools ./configure.sh script via dh_auto_configure in d/rules

* running `python3 -m build` in d/rules to generate the PKG-INFO file to later move it via dh_install to nftables-0.1-py3.11.egg-info. This is not elegant because the embedded version in the file path.

* pip install: one of the referenced methods to handle python's setuptools deprecation [0]is to use pip. But I'm reluctant to run pip (also, couldn't get it to produce the same content for the deb file)

I would appreciate additional suggestions and hints. Patches welcome.

regards.

PS: I'm on vacations, so I may be slow to respond to this email.


[0] See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

<< move away from a model where there is one, single authoritative way to do things and towards fostering an environment that allows people to develop different tools that work for their workflow. Thanks to all the standards work that's gone on, there has been a profusion of new packaging projects arising, and you should look to see which ones fit your needs.>>

[1] https://salsa.debian.org/pkg-netfilter-team/pkg-nftables/-/blob/master/debian/patches/0001-py.patch

Reply via email to