summaryrefslogtreecommitdiff
path: root/tools/perf/python
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2026-09-21 10:57:19 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-28 18:30:01 +0200
commit5479e1a13b7592c5010b95b11a1167989dfd6bf1 (patch)
treeb4279e1f2c8004577cfd6b816105ef19db75442f /tools/perf/python
parent51d3e358fef9c406e7ad4026637c8d7e73ff0501 (diff)
downloadlinux-next-5479e1a13b7592c5010b95b11a1167989dfd6bf1.tar.gz
linux-next-5479e1a13b7592c5010b95b11a1167989dfd6bf1.zip
perf tools: Put Python bytecode in output directory
The PMU events are processed into C sources by Python scripts, which normally results in writing bytecode for each module into the source tree. This prevents a fully out-of-tree build. To fix this, set $PYTHONPYCACHEPREFIX to relocate the bytecode cache directory in an out-of-tree build. Note, this environment variable is only supported by python 3.8+, but the file Documentation/Changes states the minimum supported python for builds is 3.9.x. In an in-tree build in tools/perf setting the variable causes a single __pycache__ directory in the source tree. Expand python-clean to also clean the __pycache__ and perf.pyi. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Ben Hutchings <benh@debian.org> Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python')
0 files changed, 0 insertions, 0 deletions