From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A326454D1; Sun, 23 Jun 2024 14:30:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D736A402AB; Sun, 23 Jun 2024 14:30:37 +0200 (CEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mails.dpdk.org (Postfix) with ESMTP id 0EF03402A8 for ; Sun, 23 Jun 2024 14:30:37 +0200 (CEST) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52cd628f21cso2309866e87.3 for ; Sun, 23 Jun 2024 05:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719145836; x=1719750636; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=57qOdfI7Vb7vIbowfZrRrBqrn3R0RQ49CRdAn8KeWCM=; b=kF7xUdWwBU4DzaDzo2kITBNBmbyxLAdDprUCi9oNSS2ZPYG7sTwrzGy09NJ/YFl94b 1gihmjalIiNhmIg72VWwRpi1xxxjm32lQC3k3gcFnbCO6Q88m7ki5++7uTykQgXeDuP0 zQod9HtQZdifhPibCnTHqn/YIb2sPMhvBl3qoo1OoVEPZrXSR71wXVU2woKOqlH6rjy2 yL5x8eyfuQaf9qL5fjvvA4DqAZpy0kKlvgQaNH7/B0ungbNkpxmMm4d33cT4Xs/DjcGF AS3PeW+SGpuYhHCS4swwTqTFnVpiIogjT62RrFpz3JDeox5kq8i6Iqfjv0SJqopVNMea cWSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719145836; x=1719750636; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=57qOdfI7Vb7vIbowfZrRrBqrn3R0RQ49CRdAn8KeWCM=; b=BxMIPcbz8BLnrJFre0IavYeo4al/d/8YhFAKzn+MuCx23cES8PiPi4E1krZ2yZ4pXF zVI8fKFD4GfDVefe8RUAxKjkAUXCPvzw0cVKAlOYW3m4luxy2o00YeQhHzRIPdGUnVHu cX6L8a3lY4gpZxzhpe+XkapMf8OzagWsCoCcDmZ1keY49/3gmsGgXqNBtISp1yt2Rwb4 hXIH8h61gd2ekH551FXIEI2NR07tKeXDqqhl6fQB31k7bYAVWlBgZd4Zb4S3lP/QJPzn qsyhwCYV0KZtuSr6Xdim10zORZo3vg/k1XshYokZjIvMfA5eTlh/vnpj0UdzWmjxPuLX GNpg== X-Gm-Message-State: AOJu0YwzpnPEcjWROlR9RE8k6Jow6VV/YApenISbF6biXNt+7iMI9kp1 +hn+7FgWi1oQy5R+0DpEBIUQWp4cI9kUWDdEg9XY5O2+Qc1fSyw7v7vzIQ== X-Google-Smtp-Source: AGHT+IEzYgQL4Dyty+sAjuGc/KBU02rCc5v0rxe8kNDR0LQkR//nHleJXdTBoWUjG+ExtH/6yLd4yw== X-Received: by 2002:a05:6512:2038:b0:52c:8abe:5204 with SMTP id 2adb3069b0e04-52ce183b723mr1116333e87.32.1719145835789; Sun, 23 Jun 2024 05:30:35 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:372d:4bf1:fd51:f809]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424817a8ed3sm103298665e9.13.2024.06.23.05.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 05:30:35 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH] meson: use built-in 'modules' helper for python dependencies Date: Sun, 23 Jun 2024 13:30:23 +0100 Message-ID: <20240623123032.35928-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Luca Boccassi 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 --- 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