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

From
Ian Rogers <irogers@google.com>
Date
2026-09-28 16:12:46
Also in
linux-perf-users
Reply to
Ian Rogers, 2026-09-21
On Mon, Sep 21, 2026 at 10:57 AM Ian Rogers [off-list ref] wrote:
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
Ben's build clean up that I've then rebased and addressed an issue
with building in tools/perf seems like a nice to land thing. I'm not
sure what more I can do to push this forward, and I replied on the
list about the Sashiko feedback, which was a little wide of the mark.
Let me know what you think; perhaps the tags are not done properly.

Thanks,
Ian

quoted hunk ↗ jump to hunk
---
 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