From 65554081a01bf507224ce6f9ff950936e265241c Mon Sep 17 00:00:00 2001 From: John Kacur Date: Fri, 31 Oct 2025 15:47:47 -0400 Subject: [PATCH 8/8] rteval: Add pyproject.toml for modern Python packaging Add pyproject.toml to support modern PEP 517/518/621 packaging while keeping setup.py for backwards compatibility with older distributions. The pyproject.toml provides project metadata (name, version, dependencies, authors) and works alongside setup.py which handles script installation (copying rteval-cmd to rteval). Requires Python >=3.10 and setuptools >=61.0. Assisted-by: Claude Signed-off-by: John Kacur --- pyproject.toml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ rteval-cmd | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000000..9fc681f3f91b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "rteval" +dynamic = ["version"] +description = "Evaluate system performance for Realtime" +readme = {text = """\ +The rteval script is used to judge the behavior of a hardware +platform while running a Realtime Linux kernel under a moderate +to heavy load. + +Provides control logic for starting a system load and then running a +response time measurement utility (cyclictest) for a specified amount +of time. When the run is finished, the sample data from cyclictest is +analyzed for standard statistical measurements (i.e mode, median, range, +mean, variance and standard deviation) and a report is generated. +""", content-type = "text/plain"} +requires-python = ">=3.10" +license = {text = "GPL-2.0-or-later"} +dependencies = [ + "lxml", + "requests", +] +authors = [ + {name = "Clark Williams", email = "williams@redhat.com"}, + {name = "David Sommerseth", email = "davids@redhat.com"}, + {name = "John Kacur", email = "jkacur@redhat.com"}, +] +maintainers = [ + {name = "John Kacur", email = "jkacur@redhat.com"}, +] + +[project.urls] +Homepage = "https://git.kernel.org/pub/scm/utils/rteval/rteval.git" + +[tool.setuptools] +packages = [ + "rteval", + "rteval.modules", + "rteval.modules.loads", + "rteval.modules.measurement", + "rteval.sysinfo" +] + +[tool.setuptools.dynamic] +version = {attr = "rteval.version.RTEVAL_VERSION"} + +[tool.setuptools.package-dir] +rteval = "rteval" +"rteval.modules" = "rteval/modules" +"rteval.modules.loads" = "rteval/modules/loads" +"rteval.modules.measurement" = "rteval/modules/measurement" +"rteval.sysinfo" = "rteval/sysinfo" + +[tool.setuptools.package-data] +rteval = ["*.xsl", "rteval.conf"] diff --git a/rteval-cmd b/rteval-cmd index 7af179321fe2..8fd37b98b069 100755 --- a/rteval-cmd +++ b/rteval-cmd @@ -307,7 +307,7 @@ if __name__ == '__main__': default_kernel_file = ModuleParameters().get('source').get('default') if os.path.exists(tarfl): if rtevcfg.srcdownload == default_kernel_file: - sys.exit("Default kernel already exists, will not download") + sys.exit(f"Default kernel {default_kernel_file} already exists, will not download") prompt = input("Kernel already exists, download and overwrite anyway? (y/n) ") prompt = prompt.lower() if prompt in ('no', 'n'): -- 2.51.1