summaryrefslogtreecommitdiff
path: root/tools/build/feature/test-python-module.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-25 23:20:14 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-26 21:12:49 +0200
commit1b7e0280e247b93db9e7b4473adb7fb633e06154 (patch)
treeecd6d3948a84eeb62adfe1519e62e982739324b2 /tools/build/feature/test-python-module.c
parent0d0f9e540d940a48b91cbea1657794d44b25aedf (diff)
downloadlinux-next-1b7e0280e247b93db9e7b4473adb7fb633e06154.tar.gz
linux-next-1b7e0280e247b93db9e7b4473adb7fb633e06154.zip
perf Makefile: Update Python script installation path
Replace the libpython feature test with a python-module feature test checking for Python C extension build capability, and update feature test references accordingly. Remove references to the legacy scripts/python directory and install standalone Python scripts (python/*.py), type stubs (python/perf.pyi), and the compiled perf extension module (python/perf*.so, when built) directly under the python directory in libexec. Update the TUI script browser (ui/browsers/scripts.c) to discover standalone scripts from the updated installation path. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build/feature/test-python-module.c')
-rw-r--r--tools/build/feature/test-python-module.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/build/feature/test-python-module.c b/tools/build/feature/test-python-module.c
new file mode 100644
index 000000000000..50e9e5062feb
--- /dev/null
+++ b/tools/build/feature/test-python-module.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <Python.h>
+
+int main(void)
+{
+ static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ .m_name = "test",
+ };
+ PyObject *module = PyModule_Create(&moduledef);
+
+ return module ? 0 : -1;
+}