From: Petr Vorel <pvorel@suse.cz>
To: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-kbuild@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org,
Rob Clark <robdclark@chromium.org>
Subject: Re: [RFC][PATCH 1/1] drm/msm: require python3 and xml.parsers.expat module
Date: Wed, 20 Nov 2024 21:08:26 +0100 [thread overview]
Message-ID: <20241120200826.GA46775@pevik> (raw)
In-Reply-To: <CAF6AEGshZMEHYT6X3fG0vYPpfa4i_o8gxOareHNggYWtkn=2Yg@mail.gmail.com>
> On Wed, Nov 20, 2024 at 7:49 AM Petr Vorel <pvorel@suse.cz> wrote:
> > 0fddd045f88e introduced python3 dependency, require it to quick early.
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi all,
> > RFC because I'm not sure if previous failed build wasn't better:
> > GENHDR drivers/gpu/drm/msm/generated/a2xx.xml.h
> > /bin/sh: python3: not found
> > This way it's documented, but CONFIG_DRM_MSM just silently disappears
> > from .config. Also because depends on $(success ..) is not evaluated
> > (understand, some expressions can be really long) one see only:
> > Depends on: n [=n].
> > I was thinking about testing via $(PYTHON3) -m "xml.parsers.expat",
> > but because expat parser (and other modules) should be part the official
> > python3 and are installed even on minimal python3 installations (e.g.
> > python3-minimal on Debian). Therefore depending on "$(PYTHON3) -V"
> > should be enough.
> Would it be more clear to do something like:
> config HAS_PYTHON3
> dev_bool $(success ...)
> (in init/Kconfig or somewhere central) and then use 'depends on
> HAS_PYTHON3'? That might make the dependency easier to see in
> menuconfig/etc
Thanks a lot, good idea, there are already few config HAVE_* in it. I'll send
v2. Before I already noticed various variables in the top level Makefile (PERL,
BASH, RUSTC, ...), but didn't find any check. Just now I noticed HAVE_RUST in
arch/Kconfig. I suppose HAVE_PYTHON3 should be in init/Kconfig.
Kind regards,
Petr
> BR,
> -R
> > Kind regards,
> > Petr
> > drivers/gpu/drm/msm/Kconfig | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> > diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> > index 90c68106b63b..2cf4573a2ff1 100644
> > --- a/drivers/gpu/drm/msm/Kconfig
> > +++ b/drivers/gpu/drm/msm/Kconfig
> > @@ -11,6 +11,7 @@ config DRM_MSM
> > depends on QCOM_LLCC || QCOM_LLCC=n
> > depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
> > depends on PM
> > + depends on $(success,$(PYTHON3) -V)
> > select IOMMU_IO_PGTABLE
> > select QCOM_MDT_LOADER if ARCH_QCOM
> > select REGULATOR
> > @@ -36,7 +37,7 @@ config DRM_MSM
> > select PM_GENERIC_DOMAINS
> > select TRACE_GPU_MEM
> > help
> > - DRM/KMS driver for MSM/snapdragon.
> > + DRM/KMS driver for MSM/snapdragon. Requires python3.
> > config DRM_MSM_GPU_STATE
> > bool
> > --
> > 2.47.0
prev parent reply other threads:[~2024-11-20 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 15:49 [RFC][PATCH 1/1] drm/msm: require python3 and xml.parsers.expat module Petr Vorel
2024-11-20 18:50 ` Rob Clark
2024-11-20 20:08 ` Petr Vorel [this message]
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=20241120200826.GA46775@pevik \
--to=pvorel@suse.cz \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.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