DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] meson: use built-in 'modules' helper for python dependencies
@ 2024-06-23 12:30 luca.boccassi
  2024-06-23 14:00 ` Dmitry Kozlyuk
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: luca.boccassi @ 2024-06-23 12:30 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson

From: Luca Boccassi <bluca@debian.org>

We now require Meson 0.53 or later, so we can use this feature introduced
in 0.51. This also fixes a build failure on SUSE Leap 15.6.

Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 buildtools/meson.build | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/buildtools/meson.build b/buildtools/meson.build
index 72447b60a0..3adf34e1a8 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -5,7 +5,11 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false)
 check_symbols = find_program('check-symbols.sh')
 ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
 
-python3 = import('python').find_installation(required: false)
+python3_required_modules = []
+if host_machine.system() != 'windows'
+    python3_required_modules = ['elftools']
+endif
+python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules)
 if python3.found()
     py3 = [python3]
 else
@@ -45,16 +49,3 @@ else
     pmdinfogen += 'elf'
 endif
 
-# TODO: starting from Meson 0.51.0 use
-#     python3 = import('python').find_installation('python',
-#        modules : python3_required_modules)
-python3_required_modules = []
-if host_machine.system() != 'windows'
-    python3_required_modules = ['elftools']
-endif
-foreach module : python3_required_modules
-    script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
-    if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
-        error('missing python module: @0@'.format(module))
-    endif
-endforeach
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-23 12:30 [PATCH] meson: use built-in 'modules' helper for python dependencies luca.boccassi
@ 2024-06-23 14:00 ` Dmitry Kozlyuk
  2024-06-24  8:14 ` Bruce Richardson
  2024-06-24  9:15 ` David Marchand
  2 siblings, 0 replies; 7+ messages in thread
From: Dmitry Kozlyuk @ 2024-06-23 14:00 UTC (permalink / raw)
  To: luca.boccassi; +Cc: dev, bruce.richardson

2024-06-23 13:30 (UTC+0100), luca.boccassi@gmail.com:
> From: Luca Boccassi <bluca@debian.org>
> 
> We now require Meson 0.53 or later, so we can use this feature introduced
> in 0.51. This also fixes a build failure on SUSE Leap 15.6.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-23 12:30 [PATCH] meson: use built-in 'modules' helper for python dependencies luca.boccassi
  2024-06-23 14:00 ` Dmitry Kozlyuk
@ 2024-06-24  8:14 ` Bruce Richardson
  2024-06-25 12:33   ` David Marchand
  2024-06-24  9:15 ` David Marchand
  2 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2024-06-24  8:14 UTC (permalink / raw)
  To: luca.boccassi; +Cc: dev

On Sun, Jun 23, 2024 at 01:30:23PM +0100, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
> 
> We now require Meson 0.53 or later, so we can use this feature introduced
> in 0.51. This also fixes a build failure on SUSE Leap 15.6.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-23 12:30 [PATCH] meson: use built-in 'modules' helper for python dependencies luca.boccassi
  2024-06-23 14:00 ` Dmitry Kozlyuk
  2024-06-24  8:14 ` Bruce Richardson
@ 2024-06-24  9:15 ` David Marchand
  2024-06-24  9:20   ` Kevin Traynor
  2024-06-24 22:04   ` Luca Boccassi
  2 siblings, 2 replies; 7+ messages in thread
From: David Marchand @ 2024-06-24  9:15 UTC (permalink / raw)
  To: luca.boccassi, Kevin Traynor; +Cc: dev, bruce.richardson

On Sun, Jun 23, 2024 at 2:30 PM <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <bluca@debian.org>
>
> We now require Meson 0.53 or later, so we can use this feature introduced
> in 0.51. This also fixes a build failure on SUSE Leap 15.6.

@Luca
The patch lgtm, but could you develop on what was wrong with SUSE?


> Cc: stable@dpdk.org

@Kevin.
Just a note, this patch is probably not relevant to 21.11 as the
switch to meson 0.53.2 was done in 22.11.

>
> Signed-off-by: Luca Boccassi <bluca@debian.org>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-24  9:15 ` David Marchand
@ 2024-06-24  9:20   ` Kevin Traynor
  2024-06-24 22:04   ` Luca Boccassi
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Traynor @ 2024-06-24  9:20 UTC (permalink / raw)
  To: David Marchand, luca.boccassi; +Cc: dev, bruce.richardson

On 24/06/2024 10:15, David Marchand wrote:
> On Sun, Jun 23, 2024 at 2:30 PM <luca.boccassi@gmail.com> wrote:
>>
>> From: Luca Boccassi <bluca@debian.org>
>>
>> We now require Meson 0.53 or later, so we can use this feature introduced
>> in 0.51. This also fixes a build failure on SUSE Leap 15.6.
> 
> @Luca
> The patch lgtm, but could you develop on what was wrong with SUSE?
> 
> 
>> Cc: stable@dpdk.org
> 
> @Kevin.
> Just a note, this patch is probably not relevant to 21.11 as the
> switch to meson 0.53.2 was done in 22.11.
> 
Ack. thanks for letting me know.

>>
>> Signed-off-by: Luca Boccassi <bluca@debian.org>
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-24  9:15 ` David Marchand
  2024-06-24  9:20   ` Kevin Traynor
@ 2024-06-24 22:04   ` Luca Boccassi
  1 sibling, 0 replies; 7+ messages in thread
From: Luca Boccassi @ 2024-06-24 22:04 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, bruce.richardson

On Mon, 24 Jun 2024 at 10:16, David Marchand <david.marchand@redhat.com> wrote:
>
> On Sun, Jun 23, 2024 at 2:30 PM <luca.boccassi@gmail.com> wrote:
> >
> > From: Luca Boccassi <bluca@debian.org>
> >
> > We now require Meson 0.53 or later, so we can use this feature introduced
> > in 0.51. This also fixes a build failure on SUSE Leap 15.6.
>
> @Luca
> The patch lgtm, but could you develop on what was wrong with SUSE?

The separate manual check is causing it to pick a different
non-default python3 version, which doesn't have elftools installed,
which breaks the meson run:

https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/openSUSE_Leap_15.6/x86_64

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] meson: use built-in 'modules' helper for python dependencies
  2024-06-24  8:14 ` Bruce Richardson
@ 2024-06-25 12:33   ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2024-06-25 12:33 UTC (permalink / raw)
  To: luca.boccassi; +Cc: dev, Bruce Richardson, Dmitry Kozlyuk

On Mon, Jun 24, 2024 at 10:15 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Sun, Jun 23, 2024 at 01:30:23PM +0100, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <bluca@debian.org>
> >
> > We now require Meson 0.53 or later, so we can use this feature introduced
> > in 0.51. This also fixes a build failure on SUSE Leap 15.6.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-25 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-23 12:30 [PATCH] meson: use built-in 'modules' helper for python dependencies luca.boccassi
2024-06-23 14:00 ` Dmitry Kozlyuk
2024-06-24  8:14 ` Bruce Richardson
2024-06-25 12:33   ` David Marchand
2024-06-24  9:15 ` David Marchand
2024-06-24  9:20   ` Kevin Traynor
2024-06-24 22:04   ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).