[PATCH v2 2/2] python/sepolicy: add a pyproject.toml file

Stephen Smalley <[email protected]> Fri, 24 Jul 2026 13:51:01 -0400
Newsgroups org.kernel.vger.selinux
Message-ID <[email protected]>
Add a pyproject.toml file for the sepolicy python module.  This
required also updating setup.py to avoid defining author outside of
pyproject.toml, and I further updated the authors to refer to the list
like libselinux since Dan is enjoying retirement.

Fixes: https://github.com/SELinuxProject/selinux/issues/505
Signed-off-by: Stephen Smalley <[email protected]>
---
v2 drops the dependencies since those were breaking, presumably
because the libselinux python module is just called "selinux"?
I remain unsure as to the correctness/completeness of these but
they did pass the CI fully.

 python/sepolicy/pyproject.toml | 15 +++++++++++++++
 python/sepolicy/setup.py       |  2 --
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 python/sepolicy/pyproject.toml

diff --git a/python/sepolicy/pyproject.toml b/python/sepolicy/pyproject.toml
new file mode 100644
index 00000000..d33e78c8
--- /dev/null
+++ b/python/sepolicy/pyproject.toml
@@ -0,0 +1,15 @@
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sepolicy"
+version = "3.11"
+description = "Python tools for SELinux policy analysis (sepolicy, sepolgen)"
+license = "GPL-2.0-or-later"
+authors = [
+    { name = "SELinux Project", email = "[email protected]" }
+]
+
+[project.scripts]
+sepolicy = "sepolicy.__main__:main"
diff --git a/python/sepolicy/setup.py b/python/sepolicy/setup.py
index ca0396b5..5c4f2e5d 100644
--- a/python/sepolicy/setup.py
+++ b/python/sepolicy/setup.py
@@ -8,8 +8,6 @@ setup(
     name="sepolicy",
     version="3.11",
     description="Python SELinux Policy Analyses bindings",
-    author="Daniel Walsh",
-    author_email="[email protected]",
     packages=[
         "sepolicy",
         "sepolicy.templates",
-- 
2.55.0