Show a patch.

GET /api/1.1/patches/24156/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24156,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24156/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24156/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250818121103.20073-2-laurent.pinchart@ideasonboard.com>",
    "date": "2025-08-18T12:11:03",
    "name": "[2/2] meson: Check for Python modules manually",
    "commit_ref": "0cadad434540c5a1b41def7290c8ef16e0d3708a",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3fad71dd036b6b9bbee971e0ab53c47c3659bbe6",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24156/mbox/",
    "series": [
        {
            "id": 5391,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5391/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5391",
            "date": "2025-08-18T12:11:02",
            "name": "[1/2] Documentation: Use python3 directly to check for doxylink version",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5391/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24156/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24156/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7512DBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Aug 2025 12:11:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F27C6925A;\n\tMon, 18 Aug 2025 14:11:32 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0039C69263\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 14:11:29 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9F2CB1249\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 14:10:32 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LQZXgEia\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755519032;\n\tbh=CXmF1R+gh+w+tZyqtht9BK1JPDHkaAw2b4ypkfPxpho=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=LQZXgEiaTVffC1MfXchFx8+slgMQ435MJ04aAL13BmRyqlRx2yjwdKsu51r71rsuy\n\tNOx7Sc0G3JF8wi3LmO4ra478Lg5kuy5siti3Du/1naXqKFamfTosLPMAp7zWt5Hx0i\n\tW0F9E2xPcl9Pcmu/310vZaChZ72LBWtbisU5N3CE=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH 2/2] meson: Check for Python modules manually",
        "Date": "Mon, 18 Aug 2025 15:11:03 +0300",
        "Message-ID": "<20250818121103.20073-2-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.1",
        "In-Reply-To": "<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The meson python module's find_installation() method conveniently allows\ntesting if the interpreter provides a set of modules. We use it to check\nfor the presence of the modules required at build time. Unfortunately,\nthe meson python module is not meant to access the native Python\ninterpreter of the build machine, but the Python environment of the host\nmachine. Usage of find_installation() for this purpose is incorrect, it\nmay find modules in a different interpreter than the one used to run the\nbuild scripts that use those modules.\n\nReplace find_installation() with a manual check using python3 directly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n meson.build | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/meson.build b/meson.build\nindex d82dbaeb99ce..5e015692a22c 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -287,9 +287,14 @@ run_command('ln', '-fsT', meson.project_source_root(), meson.project_build_root(\n \n configure_file(output : 'config.h', configuration : config_h)\n \n-# Check for python installation and modules.\n-py_mod = import('python')\n-py_mod.find_installation('python3', modules : py_modules)\n+# Check for python modules.\n+foreach module : py_modules\n+    result = run_command('python3', '-c' , 'import @0@'.format(module),\n+                         capture : false, check : false)\n+    if result.returncode() != 0\n+        error('Python module \\'@0@\\' not found'.format(module))\n+    endif\n+endforeach\n \n ## Summarise Configurations\n summary({\n",
    "prefixes": [
        "2/2"
    ]
}