Linux Trace Kernel
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: benh@debian.org, acme@kernel.org, namhyung@kernel.org
Cc: linux-perf-users@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,  mingo@redhat.com,
	peterz@infradead.org, rostedt@goodmis.org,  tglozar@redhat.com,
	Ian Rogers <irogers@google.com>
Subject: [PATCH v2 1/2] perf tools: Put Python egg info in output directory
Date: Mon, 21 Sep 2026 10:57:18 -0700	[thread overview]
Message-ID: <20260921175719.846883-1-irogers@google.com> (raw)
In-Reply-To: <ag8X7gcDw6jpJsLq@decadent.org.uk>

From: Ben Hutchings <benh@debian.org>

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 <benh@debian.org>
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


  parent reply	other threads:[~2026-09-21 17:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 14:34 [PATCH 0/3] Fix out-of-tree build of some tools Ben Hutchings
2026-05-21 14:35 ` [PATCH 1/3] rtla: Fix output files in source tree Ben Hutchings
2026-05-21 14:48   ` Steven Rostedt
2026-05-21 14:35 ` [PATCH 2/3] perf tools: Put Python egg info in output directory Ben Hutchings
2026-05-21 14:35 ` [PATCH 3/3] perf tools: Put Python bytecode " Ben Hutchings
2026-05-21 17:50 ` [PATCH 0/3] Fix out-of-tree build of some tools Ian Rogers
2026-09-15 23:08   ` Ian Rogers
2026-09-21 17:57 ` Ian Rogers [this message]
2026-09-21 17:57   ` [PATCH v2 2/2] perf tools: Put Python bytecode in output directory Ian Rogers
2026-09-21 18:05     ` sashiko-bot
2026-09-21 18:12       ` Ian Rogers
2026-09-21 18:03   ` [PATCH v2 1/2] perf tools: Put Python egg info " sashiko-bot
2026-09-28 16:12   ` Ian Rogers
2026-09-28 16:26     ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260921175719.846883-1-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=benh@debian.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglozar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox