From af2f226e8c29fc4dfa381043b7de2c145532bbae Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Fri, 25 Sep 2026 23:19:42 -0700 Subject: [PATCH] perf Makefile: Install standalone Python scripts during transition Install the newly ported standalone Python scripts (python/*.py), type stubs (python/perf.pyi), and compiled perf Python extension module (python/perf*.so, when built) into $(perfexec_instdir_SQ)/python alongside the legacy scripts during the transition phase so that newly ported scripts can import perf directly from the installation directory before legacy support is removed. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 168b286770f3..89edf2720fc1 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -907,6 +907,13 @@ ifndef NO_LIBPYTHON $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) scripts/python/*.py -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + $(call QUIET_INSTALL, python-scripts-standalone) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/python' && \ + $(INSTALL) python/*.py -m 755 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/python' && \ + $(INSTALL) python/perf.pyi -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/python' && \ + if [ -f "$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX)" ]; then \ + $(INSTALL) "$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX)" -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/python'; \ + fi endif $(call QUIET_INSTALL, dlfilters) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/dlfilters'; \