[PATCH v2 1/2] perf tools: Put Python egg info in output directory

From
Ian Rogers <irogers@google.com>
Date
2026-09-21 17:57:36
Also in
linux-perf-users
Reply to
Ben Hutchings, 2026-05-21
From: Ben Hutchings <redacted>

Installing the Python extension currently creates an egg-info
directory in the source tree, preventing a fully out-of-tree build.

Add the necessary runes to the setup.py comamnd line to relocate the
egg-info directory in an out-of-tree build.

Signed-off-by: Ben Hutchings <redacted>
Reviewed-by: Ian Rogers <irogers@google.com>
---
v2: Rebase
---
 tools/perf/Makefile.perf | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 2438b40eaaec..438102bcae6c 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -908,7 +908,9 @@ install-build-deps:
 	$(Q)$(SHELL) $(srctree)/tools/perf/scripts/install-build-deps.sh $(INSTALL_BUILD_DEPS_ARGS)
 
 install-python_ext:
-	$(PYTHON_WORD) util/setup.py $(python_setup_quiet) install --root='/$(DESTDIR_SQ)'
+	$(PYTHON_WORD) util/setup.py $(python_setup_quiet) \
+		$(if $(OUTPUT),egg_info --egg-base $(OUTPUT)) \
+		install --root='/$(DESTDIR_SQ)'
 
 # 'make install-doc' should call 'make -C Documentation install'
 $(INSTALL_DOC_TARGETS):
-- 
2.55.0.1082.g2b9226bbc0-goog
Thread (14 messages) 14 messages, 5 authors, last reply 2026-09-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help