[PATCH 21/23] tuna: Add pyproject.toml for modern Python packaging

John Kacur
2025-11-07T18:58:22Z

Add pyproject.toml to support PEP 517/518 modern Python packaging
while maintaining backwards compatibility with setup.py.

Configuration includes:
- Build system using setuptools>=61.0
- Project metadata (authors, maintainers, version)
- Python version requirement (>=3.10)
- Dependencies (python-linux-procfs)
- Entry points for tuna and oscilloscope commands
- Package classifiers for PyPI

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
.gitignore | 1 +
MANIFEST | 30 ------------------------------
pyproject.toml | 42 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+), 30 deletions(-)
delete mode 100644 MANIFEST
create mode 100644 pyproject.toml

diff --git a/.gitignore b/.gitignore
index 29b00a0834ab..d8e20215de9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
*~
*.swp
tags
+CLAUDE.md
diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index 95ae7c5ddd74..000000000000
--- a/MANIFEST
+++ /dev/null
@@ -1,30 +0,0 @@
-help/kthreads/
-oscilloscope-cmd.py
-tuna-cmd.py
-tuna/__init__.py
-tuna/help.py
-tuna/sysfs.py
-tuna/oscilloscope.py
-tuna/tuna.py
-tuna/config.py
-tuna/tuna_gui.py
-tuna/tuna_gui.glade
-tuna/gui/__init__.py
-tuna/gui/cpuview.py
-tuna/gui/irqview.py
-tuna/gui/procview.py
-tuna/gui/commonview.py
-tuna/gui/profileview.py
-tuna/gui/util.py
-setup.py
-rpm/SPECS/tuna.spec
-MANIFEST
-po/LINGUAS
-po/POTFILES.in
-po/ja.po
-po/pt_BR.po
-po/zh_CN.po
-ChangeLog
-docs/oscilloscope+tuna.html
-docs/oscilloscope+tuna.pdf
-docs/tuna.8
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 000000000000..8333a1acb913
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,42 @@
+[build-system]
+requires = ["setuptools>=61.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "tuna"
+version = "0.19"
+description = "Application tuning GUI"
+license = {text = "GPL-2.0-only"}
+authors = [
+ {name = "Arnaldo Carvalho de Melo", email = "acme@redhat.com"},
+ {name = "John Kacur", email = "jkacur@redhat.com"}
+]
+maintainers = [
+ {name = "John Kacur", email = "jkacur@redhat.com"}
+]
+requires-python = ">=3.10"
+dependencies = [
+ "python-linux-procfs",
+]
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: System Administrators",
+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
+ "Operating System :: POSIX :: Linux",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: System :: Systems Administration",
+]
+
+[project.urls]
+Homepage = "https://www.kernel.org/pub/software/utils/tuna"
+Source = "git.kernel.org/pub/scm/utils/tuna/tuna.git/"
+
+[project.scripts]
+tuna = "tuna.tuna:main"
+oscilloscope = "tuna.oscilloscope:main"
+
+[tool.setuptools.packages.find]
+include = ["tuna*"]
--
2.51.1