Re: [PATCH v2 2/4] perf build: Add the output Python directory to pylint's PYTHONPATH
From: Ian Rogers
Date: Wed Sep 30 2026 - 15:33:21 EST
On Wed, Sep 30, 2026 at 6:11 AM Leo Yan <leo.yan@xxxxxxx> wrote:
>
> Prepend the output Python directory to pylint's PYTHONPATH so builds
> using O= can also find the generated extension.
>
> Fixes: 5fe83fb352c8 ("perf build: Make pylint build test opt-out (NO_PYLINT=1)")
> Reported-by: Aishwarya TCV <aishwarya.tcv@xxxxxxx>
> Assisted-by: Codex:gpt-6
> Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Thanks!
Ian
> ---
> tools/perf/Makefile.perf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 0eb4e7c29c400021907d3da716bc4871f0df8d88..7ceefc1da774625d9f48d3bb0498ceb819b84d26 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -310,7 +310,7 @@ ifneq ($(force_fixdep),1)
> $(warning Warning: pylint version is older than 2.16.0, skipping pylint checks.)
> override PYLINT :=
> else
> - override PYLINT := PYTHONPATH=$(srctree)/tools/perf/python:$(srctree)/tools/perf/pmu-events \
> + override PYLINT := PYTHONPATH=$(abspath $(OUTPUT)python):$(srctree)/tools/perf/python:$(srctree)/tools/perf/pmu-events \
> $(PYLINT) --disable=all --enable=E,W --disable=W0123,W0311,W0511,W0603,W0622,W0718 \
> --ignored-modules=textual,setproctitle
> endif
>
> --
> 2.34.1
>