[{"id":38264,"web_url":"https://patchwork.libcamera.org/comment/38264/","msgid":"<20260220153305.GB1691215@killaraus.ideasonboard.com>","date":"2026-02-20T15:33:05","subject":"Re: [PATCH v2] py: Fix include order","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Feb 20, 2026 at 03:40:08PM +0100, Barnabás Pőcze wrote:\n> Python.h hence the pybind header must be included first since pyconfig.h\n> unconditionally overrides certain feature test macros[0]. This was mostly\n> hidden by the fact that macro redefinitions with the same value do not\n> trigger compiler warnings. However, glibc 43 has changed certain defaults[1],\n> causing mismatches, leading to compiler warnings.\n> \n> So change the include order so that `<pybind11/...>` headers are included\n> first and then the local `\"py_...\"` headers, and then everything else.\n> \n> Adjust `.clang-format` and the documentation as well.\n> \n> [0]: https://docs.python.org/3/c-api/intro.html#include-files\n> [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=a5cc3018f31a125f019685b239c6e5a0bf1a272b\n> \n> Link: https://github.com/python/cpython/issues/61322\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n> changes in v2:\n>   * edit documentation\n> \n> v1: https://patchwork.libcamera.org/patch/26184/\n> ---\n>  .clang-format                                 |  6 ++++++\n>  Documentation/coding-style.rst                |  6 ++++++\n>  src/py/libcamera/py_camera_manager.h          |  4 ++--\n>  src/py/libcamera/py_color_space.cpp           |  6 +++---\n>  src/py/libcamera/py_controls_generated.cpp.in |  4 ++--\n>  src/py/libcamera/py_enums.cpp                 |  4 ++--\n>  src/py/libcamera/py_formats_generated.cpp.in  |  4 ++--\n>  src/py/libcamera/py_geometry.cpp              | 10 +++++-----\n>  src/py/libcamera/py_helpers.cpp               |  8 ++++----\n>  src/py/libcamera/py_helpers.h                 |  4 ++--\n>  src/py/libcamera/py_main.cpp                  | 15 +++++++--------\n>  src/py/libcamera/py_main.h                    |  4 ++--\n>  src/py/libcamera/py_transform.cpp             |  6 +++---\n>  13 files changed, 46 insertions(+), 35 deletions(-)\n> \n> diff --git a/.clang-format b/.clang-format\n> index 7fc30f614..7dbeea784 100644\n> --- a/.clang-format\n> +++ b/.clang-format\n> @@ -77,6 +77,12 @@ IncludeCategories:\n>    - Regex:           '<Q([A-Za-z0-9\\-_])+>'\n>      CaseSensitive:   true\n>      Priority:        9\n> +  # Python.h hence pybind11 headers must be included first\n> +  # https://docs.python.org/3/c-api/intro.html#include-files\n> +  - Regex:           '<pybind11/.*>'\n> +    Priority:        -9\n> +  - Regex:           '\"py_.*\"'\n> +    Priority:        -8\n>    # Headers in <> with an extension. (+system libraries)\n>    - Regex:           '<([A-Za-z0-9\\-_])+\\.h>'\n>      Priority:        2\n> diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst\n> index 3352b75c7..e0864b78d 100644\n> --- a/Documentation/coding-style.rst\n> +++ b/Documentation/coding-style.rst\n> @@ -95,6 +95,12 @@ System and library headers shall be included with angle brackets. Project\n>  headers shall be included with angle brackets for the libcamera public API\n>  headers, and with double quotes for internal libcamera headers.\n> \n> +.. note::\n> +   As an exception pybind11 headers and local ``py_*`` headers must be included first\n> +   in the Python bindings due to the requirements outlined in the `Python documentation`_.\n> +\n> +.. _Python documentation: https://docs.python.org/3/c-api/intro.html#include-files\n> +\n> \n>  C++ Specific Rules\n>  ------------------\n> diff --git a/src/py/libcamera/py_camera_manager.h b/src/py/libcamera/py_camera_manager.h\n> index af69b915e..7da65172e 100644\n> --- a/src/py/libcamera/py_camera_manager.h\n> +++ b/src/py/libcamera/py_camera_manager.h\n> @@ -5,12 +5,12 @@\n> \n>  #pragma once\n> \n> +#include <pybind11/pybind11.h>\n> +\n>  #include <libcamera/base/mutex.h>\n> \n>  #include <libcamera/libcamera.h>\n> \n> -#include <pybind11/pybind11.h>\n> -\n>  using namespace libcamera;\n> \n>  class PyCameraManager\n> diff --git a/src/py/libcamera/py_color_space.cpp b/src/py/libcamera/py_color_space.cpp\n> index fd5a5dabe..2f4d2d891 100644\n> --- a/src/py/libcamera/py_color_space.cpp\n> +++ b/src/py/libcamera/py_color_space.cpp\n> @@ -5,15 +5,15 @@\n>   * Python bindings - Color Space classes\n>   */\n> \n> -#include <libcamera/color_space.h>\n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/operators.h>\n>  #include <pybind11/pybind11.h>\n>  #include <pybind11/stl.h>\n> \n>  #include \"py_main.h\"\n> \n> +#include <libcamera/color_space.h>\n> +#include <libcamera/libcamera.h>\n\nWhile at it you can drop color_space.h as it's included in libcamera.h.\n\n> +\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;\n> diff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in\n> index 22a132d19..c42a477bb 100644\n> --- a/src/py/libcamera/py_controls_generated.cpp.in\n> +++ b/src/py/libcamera/py_controls_generated.cpp.in\n> @@ -7,12 +7,12 @@\n>   * This file is auto-generated. Do not edit.\n>   */\n> \n> -#include <libcamera/{{header}}>\n> -\n>  #include <pybind11/pybind11.h>\n> \n>  #include \"py_main.h\"\n> \n> +#include <libcamera/{{header}}>\n> +\n>  namespace py = pybind11;\n> \n>  class Py{{mode|capitalize}}\n> diff --git a/src/py/libcamera/py_enums.cpp b/src/py/libcamera/py_enums.cpp\n> index 9e75ec1a9..715b63880 100644\n> --- a/src/py/libcamera/py_enums.cpp\n> +++ b/src/py/libcamera/py_enums.cpp\n> @@ -5,12 +5,12 @@\n>   * Python bindings - Enumerations\n>   */\n> \n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/pybind11.h>\n> \n>  #include \"py_main.h\"\n> \n> +#include <libcamera/libcamera.h>\n> +\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;\n> diff --git a/src/py/libcamera/py_formats_generated.cpp.in b/src/py/libcamera/py_formats_generated.cpp.in\n> index c5fb90639..bd0ccdc3e 100644\n> --- a/src/py/libcamera/py_formats_generated.cpp.in\n> +++ b/src/py/libcamera/py_formats_generated.cpp.in\n> @@ -7,10 +7,10 @@\n>   * This file is auto-generated. Do not edit.\n>   */\n> \n> -#include <libcamera/formats.h>\n> -\n>  #include <pybind11/pybind11.h>\n> \n> +#include <libcamera/formats.h>\n> +\n>  #include \"py_main.h\"\n> \n>  namespace py = pybind11;\n> diff --git a/src/py/libcamera/py_geometry.cpp b/src/py/libcamera/py_geometry.cpp\n> index c7e303609..d96015f03 100644\n> --- a/src/py/libcamera/py_geometry.cpp\n> +++ b/src/py/libcamera/py_geometry.cpp\n> @@ -5,17 +5,17 @@\n>   * Python bindings - Geometry classes\n>   */\n> \n> -#include <array>\n> -\n> -#include <libcamera/geometry.h>\n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/operators.h>\n>  #include <pybind11/pybind11.h>\n>  #include <pybind11/stl.h>\n> \n>  #include \"py_main.h\"\n> \n> +#include <array>\n> +\n> +#include <libcamera/geometry.h>\n> +#include <libcamera/libcamera.h>\n\nSame here for geometry.h.\n\n> +\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;\n> diff --git a/src/py/libcamera/py_helpers.cpp b/src/py/libcamera/py_helpers.cpp\n> index 8c55ef845..b9142225c 100644\n> --- a/src/py/libcamera/py_helpers.cpp\n> +++ b/src/py/libcamera/py_helpers.cpp\n> @@ -3,14 +3,14 @@\n>   * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>   */\n> \n> -#include \"py_helpers.h\"\n> -\n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/functional.h>\n>  #include <pybind11/stl.h>\n>  #include <pybind11/stl_bind.h>\n> \n> +#include \"py_helpers.h\"\n> +\n> +#include <libcamera/libcamera.h>\n> +\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;\n> diff --git a/src/py/libcamera/py_helpers.h b/src/py/libcamera/py_helpers.h\n> index 983969dff..989fae77b 100644\n> --- a/src/py/libcamera/py_helpers.h\n> +++ b/src/py/libcamera/py_helpers.h\n> @@ -5,9 +5,9 @@\n> \n>  #pragma once\n> \n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/pybind11.h>\n> \n> +#include <libcamera/libcamera.h>\n> +\n>  pybind11::object controlValueToPy(const libcamera::ControlValue &cv);\n>  libcamera::ControlValue pyToControlValue(const pybind11::object &ob, libcamera::ControlType type);\n> diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\n> index a983ea75c..d0ef6915b 100644\n> --- a/src/py/libcamera/py_main.cpp\n> +++ b/src/py/libcamera/py_main.cpp\n> @@ -5,6 +5,13 @@\n>   * Python bindings\n>   */\n> \n> +#include <pybind11/functional.h>\n> +#include <pybind11/pybind11.h>\n> +#include <pybind11/stl.h>\n> +#include <pybind11/stl_bind.h>\n> +\n> +#include \"py_camera_manager.h\"\n> +#include \"py_helpers.h\"\n>  #include \"py_main.h\"\n> \n>  #include <limits>\n> @@ -17,14 +24,6 @@\n> \n>  #include <libcamera/libcamera.h>\n> \n> -#include <pybind11/functional.h>\n> -#include <pybind11/pybind11.h>\n> -#include <pybind11/stl.h>\n> -#include <pybind11/stl_bind.h>\n> -\n> -#include \"py_camera_manager.h\"\n> -#include \"py_helpers.h\"\n> -\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;\n> diff --git a/src/py/libcamera/py_main.h b/src/py/libcamera/py_main.h\n> index 4d594326e..dd31c6d9a 100644\n> --- a/src/py/libcamera/py_main.h\n> +++ b/src/py/libcamera/py_main.h\n> @@ -5,10 +5,10 @@\n> \n>  #pragma once\n> \n> -#include <libcamera/base/log.h>\n> -\n>  #include <pybind11/pybind11.h>\n> \n> +#include <libcamera/base/log.h>\n> +\n>  namespace libcamera {\n> \n>  LOG_DECLARE_CATEGORY(Python)\n> diff --git a/src/py/libcamera/py_transform.cpp b/src/py/libcamera/py_transform.cpp\n> index 768260ffc..8719b5ff5 100644\n> --- a/src/py/libcamera/py_transform.cpp\n> +++ b/src/py/libcamera/py_transform.cpp\n> @@ -5,15 +5,15 @@\n>   * Python bindings - Transform class\n>   */\n> \n> -#include <libcamera/transform.h>\n> -#include <libcamera/libcamera.h>\n> -\n>  #include <pybind11/operators.h>\n>  #include <pybind11/pybind11.h>\n>  #include <pybind11/stl.h>\n> \n>  #include \"py_main.h\"\n> \n> +#include <libcamera/transform.h>\n> +#include <libcamera/libcamera.h>\n\nSame here, drop transform.h.\n\nNo need to resubmit just for this.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\n>  namespace py = pybind11;\n> \n>  using namespace libcamera;","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 87338C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 Feb 2026 15:33:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1A8961FBF;\n\tFri, 20 Feb 2026 16:33:10 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 39D5561FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Feb 2026 16:33:09 +0100 (CET)","from killaraus.ideasonboard.com (unknown [83.245.237.175])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 01D66371;\n\tFri, 20 Feb 2026 16:32:14 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"adiFymvv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771601535;\n\tbh=vmIb2T9Xh12xQwoX8iE8WNRt6MXy/mQujNEmnO0jk+g=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=adiFymvv4ICijQsrzm0RJtTF8yAF0WzzOiFwSMe07ZrHsOASuXNhw4sGcpNgWXPGk\n\thooPfHbbKIy68Y4L8hNsfIOwyKtqUE/hJNxGEEs+D6lbEqzKV/2e8sEhL3RxempbXP\n\tueRZZXRKSS8dyHobMtnncJTgAflmWgFrEecAUq6Q=","Date":"Fri, 20 Feb 2026 16:33:05 +0100","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] py: Fix include order","Message-ID":"<20260220153305.GB1691215@killaraus.ideasonboard.com>","References":"<20260220144008.211492-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260220144008.211492-1-barnabas.pocze@ideasonboard.com>","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>"}},{"id":38340,"web_url":"https://patchwork.libcamera.org/comment/38340/","msgid":"<e38bba3a-44f8-4b53-9143-5ef774083fba@ideasonboard.com>","date":"2026-03-06T07:10:06","subject":"Re: [PATCH v2] py: Fix include order","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 02. 20. 16:33 keltezéssel, Laurent Pinchart írta:\n> On Fri, Feb 20, 2026 at 03:40:08PM +0100, Barnabás Pőcze wrote:\n>> Python.h hence the pybind header must be included first since pyconfig.h\n>> unconditionally overrides certain feature test macros[0]. This was mostly\n>> hidden by the fact that macro redefinitions with the same value do not\n>> trigger compiler warnings. However, glibc 43 has changed certain defaults[1],\n>> causing mismatches, leading to compiler warnings.\n>>\n>> So change the include order so that `<pybind11/...>` headers are included\n>> first and then the local `\"py_...\"` headers, and then everything else.\n>>\n>> Adjust `.clang-format` and the documentation as well.\n>>\n>> [0]: https://docs.python.org/3/c-api/intro.html#include-files\n>> [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=a5cc3018f31a125f019685b239c6e5a0bf1a272b\n>>\n>> Link: https://github.com/python/cpython/issues/61322\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>> changes in v2:\n>>    * edit documentation\n>>\n>> v1: https://patchwork.libcamera.org/patch/26184/\n>> ---\n>>   .clang-format                                 |  6 ++++++\n>>   Documentation/coding-style.rst                |  6 ++++++\n>>   src/py/libcamera/py_camera_manager.h          |  4 ++--\n>>   src/py/libcamera/py_color_space.cpp           |  6 +++---\n>>   src/py/libcamera/py_controls_generated.cpp.in |  4 ++--\n>>   src/py/libcamera/py_enums.cpp                 |  4 ++--\n>>   src/py/libcamera/py_formats_generated.cpp.in  |  4 ++--\n>>   src/py/libcamera/py_geometry.cpp              | 10 +++++-----\n>>   src/py/libcamera/py_helpers.cpp               |  8 ++++----\n>>   src/py/libcamera/py_helpers.h                 |  4 ++--\n>>   src/py/libcamera/py_main.cpp                  | 15 +++++++--------\n>>   src/py/libcamera/py_main.h                    |  4 ++--\n>>   src/py/libcamera/py_transform.cpp             |  6 +++---\n>>   13 files changed, 46 insertions(+), 35 deletions(-)\n>>\n>> diff --git a/.clang-format b/.clang-format\n>> index 7fc30f614..7dbeea784 100644\n>> --- a/.clang-format\n>> +++ b/.clang-format\n>> @@ -77,6 +77,12 @@ IncludeCategories:\n>>     - Regex:           '<Q([A-Za-z0-9\\-_])+>'\n>>       CaseSensitive:   true\n>>       Priority:        9\n>> +  # Python.h hence pybind11 headers must be included first\n>> +  # https://docs.python.org/3/c-api/intro.html#include-files\n>> +  - Regex:           '<pybind11/.*>'\n>> +    Priority:        -9\n>> +  - Regex:           '\"py_.*\"'\n>> +    Priority:        -8\n>>     # Headers in <> with an extension. (+system libraries)\n>>     - Regex:           '<([A-Za-z0-9\\-_])+\\.h>'\n>>       Priority:        2\n>> diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst\n>> index 3352b75c7..e0864b78d 100644\n>> --- a/Documentation/coding-style.rst\n>> +++ b/Documentation/coding-style.rst\n>> @@ -95,6 +95,12 @@ System and library headers shall be included with angle brackets. Project\n>>   headers shall be included with angle brackets for the libcamera public API\n>>   headers, and with double quotes for internal libcamera headers.\n>>\n>> +.. note::\n>> +   As an exception pybind11 headers and local ``py_*`` headers must be included first\n>> +   in the Python bindings due to the requirements outlined in the `Python documentation`_.\n>> +\n>> +.. _Python documentation: https://docs.python.org/3/c-api/intro.html#include-files\n>> +\n>>\n>>   C++ Specific Rules\n>>   ------------------\n>> diff --git a/src/py/libcamera/py_camera_manager.h b/src/py/libcamera/py_camera_manager.h\n>> index af69b915e..7da65172e 100644\n>> --- a/src/py/libcamera/py_camera_manager.h\n>> +++ b/src/py/libcamera/py_camera_manager.h\n>> @@ -5,12 +5,12 @@\n>>\n>>   #pragma once\n>>\n>> +#include <pybind11/pybind11.h>\n>> +\n>>   #include <libcamera/base/mutex.h>\n>>\n>>   #include <libcamera/libcamera.h>\n>>\n>> -#include <pybind11/pybind11.h>\n>> -\n>>   using namespace libcamera;\n>>\n>>   class PyCameraManager\n>> diff --git a/src/py/libcamera/py_color_space.cpp b/src/py/libcamera/py_color_space.cpp\n>> index fd5a5dabe..2f4d2d891 100644\n>> --- a/src/py/libcamera/py_color_space.cpp\n>> +++ b/src/py/libcamera/py_color_space.cpp\n>> @@ -5,15 +5,15 @@\n>>    * Python bindings - Color Space classes\n>>    */\n>>\n>> -#include <libcamera/color_space.h>\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/operators.h>\n>>   #include <pybind11/pybind11.h>\n>>   #include <pybind11/stl.h>\n>>\n>>   #include \"py_main.h\"\n>>\n>> +#include <libcamera/color_space.h>\n>> +#include <libcamera/libcamera.h>\n> \n> While at it you can drop color_space.h as it's included in libcamera.h.\n> \n>> +\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>> diff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in\n>> index 22a132d19..c42a477bb 100644\n>> --- a/src/py/libcamera/py_controls_generated.cpp.in\n>> +++ b/src/py/libcamera/py_controls_generated.cpp.in\n>> @@ -7,12 +7,12 @@\n>>    * This file is auto-generated. Do not edit.\n>>    */\n>>\n>> -#include <libcamera/{{header}}>\n>> -\n>>   #include <pybind11/pybind11.h>\n>>\n>>   #include \"py_main.h\"\n>>\n>> +#include <libcamera/{{header}}>\n>> +\n>>   namespace py = pybind11;\n>>\n>>   class Py{{mode|capitalize}}\n>> diff --git a/src/py/libcamera/py_enums.cpp b/src/py/libcamera/py_enums.cpp\n>> index 9e75ec1a9..715b63880 100644\n>> --- a/src/py/libcamera/py_enums.cpp\n>> +++ b/src/py/libcamera/py_enums.cpp\n>> @@ -5,12 +5,12 @@\n>>    * Python bindings - Enumerations\n>>    */\n>>\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/pybind11.h>\n>>\n>>   #include \"py_main.h\"\n>>\n>> +#include <libcamera/libcamera.h>\n>> +\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>> diff --git a/src/py/libcamera/py_formats_generated.cpp.in b/src/py/libcamera/py_formats_generated.cpp.in\n>> index c5fb90639..bd0ccdc3e 100644\n>> --- a/src/py/libcamera/py_formats_generated.cpp.in\n>> +++ b/src/py/libcamera/py_formats_generated.cpp.in\n>> @@ -7,10 +7,10 @@\n>>    * This file is auto-generated. Do not edit.\n>>    */\n>>\n>> -#include <libcamera/formats.h>\n>> -\n>>   #include <pybind11/pybind11.h>\n>>\n>> +#include <libcamera/formats.h>\n>> +\n>>   #include \"py_main.h\"\n>>\n>>   namespace py = pybind11;\n>> diff --git a/src/py/libcamera/py_geometry.cpp b/src/py/libcamera/py_geometry.cpp\n>> index c7e303609..d96015f03 100644\n>> --- a/src/py/libcamera/py_geometry.cpp\n>> +++ b/src/py/libcamera/py_geometry.cpp\n>> @@ -5,17 +5,17 @@\n>>    * Python bindings - Geometry classes\n>>    */\n>>\n>> -#include <array>\n>> -\n>> -#include <libcamera/geometry.h>\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/operators.h>\n>>   #include <pybind11/pybind11.h>\n>>   #include <pybind11/stl.h>\n>>\n>>   #include \"py_main.h\"\n>>\n>> +#include <array>\n>> +\n>> +#include <libcamera/geometry.h>\n>> +#include <libcamera/libcamera.h>\n> \n> Same here for geometry.h.\n> \n>> +\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>> diff --git a/src/py/libcamera/py_helpers.cpp b/src/py/libcamera/py_helpers.cpp\n>> index 8c55ef845..b9142225c 100644\n>> --- a/src/py/libcamera/py_helpers.cpp\n>> +++ b/src/py/libcamera/py_helpers.cpp\n>> @@ -3,14 +3,14 @@\n>>    * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n>>    */\n>>\n>> -#include \"py_helpers.h\"\n>> -\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/functional.h>\n>>   #include <pybind11/stl.h>\n>>   #include <pybind11/stl_bind.h>\n>>\n>> +#include \"py_helpers.h\"\n>> +\n>> +#include <libcamera/libcamera.h>\n>> +\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>> diff --git a/src/py/libcamera/py_helpers.h b/src/py/libcamera/py_helpers.h\n>> index 983969dff..989fae77b 100644\n>> --- a/src/py/libcamera/py_helpers.h\n>> +++ b/src/py/libcamera/py_helpers.h\n>> @@ -5,9 +5,9 @@\n>>\n>>   #pragma once\n>>\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/pybind11.h>\n>>\n>> +#include <libcamera/libcamera.h>\n>> +\n>>   pybind11::object controlValueToPy(const libcamera::ControlValue &cv);\n>>   libcamera::ControlValue pyToControlValue(const pybind11::object &ob, libcamera::ControlType type);\n>> diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\n>> index a983ea75c..d0ef6915b 100644\n>> --- a/src/py/libcamera/py_main.cpp\n>> +++ b/src/py/libcamera/py_main.cpp\n>> @@ -5,6 +5,13 @@\n>>    * Python bindings\n>>    */\n>>\n>> +#include <pybind11/functional.h>\n>> +#include <pybind11/pybind11.h>\n>> +#include <pybind11/stl.h>\n>> +#include <pybind11/stl_bind.h>\n>> +\n>> +#include \"py_camera_manager.h\"\n>> +#include \"py_helpers.h\"\n>>   #include \"py_main.h\"\n>>\n>>   #include <limits>\n>> @@ -17,14 +24,6 @@\n>>\n>>   #include <libcamera/libcamera.h>\n>>\n>> -#include <pybind11/functional.h>\n>> -#include <pybind11/pybind11.h>\n>> -#include <pybind11/stl.h>\n>> -#include <pybind11/stl_bind.h>\n>> -\n>> -#include \"py_camera_manager.h\"\n>> -#include \"py_helpers.h\"\n>> -\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>> diff --git a/src/py/libcamera/py_main.h b/src/py/libcamera/py_main.h\n>> index 4d594326e..dd31c6d9a 100644\n>> --- a/src/py/libcamera/py_main.h\n>> +++ b/src/py/libcamera/py_main.h\n>> @@ -5,10 +5,10 @@\n>>\n>>   #pragma once\n>>\n>> -#include <libcamera/base/log.h>\n>> -\n>>   #include <pybind11/pybind11.h>\n>>\n>> +#include <libcamera/base/log.h>\n>> +\n>>   namespace libcamera {\n>>\n>>   LOG_DECLARE_CATEGORY(Python)\n>> diff --git a/src/py/libcamera/py_transform.cpp b/src/py/libcamera/py_transform.cpp\n>> index 768260ffc..8719b5ff5 100644\n>> --- a/src/py/libcamera/py_transform.cpp\n>> +++ b/src/py/libcamera/py_transform.cpp\n>> @@ -5,15 +5,15 @@\n>>    * Python bindings - Transform class\n>>    */\n>>\n>> -#include <libcamera/transform.h>\n>> -#include <libcamera/libcamera.h>\n>> -\n>>   #include <pybind11/operators.h>\n>>   #include <pybind11/pybind11.h>\n>>   #include <pybind11/stl.h>\n>>\n>>   #include \"py_main.h\"\n>>\n>> +#include <libcamera/transform.h>\n>> +#include <libcamera/libcamera.h>\n> \n> Same here, drop transform.h.\n> \n> No need to resubmit just for this.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThanks, done. Any other comments by anyone? Can it be merged?\n\n\nRegards,\nBarnabés Pőcze\n\n> \n>> +\n>>   namespace py = pybind11;\n>>\n>>   using namespace libcamera;\n>","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 A762EC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Mar 2026 07:10:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B8D666260B;\n\tFri,  6 Mar 2026 08:10:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B627762380\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Mar 2026 08:10:09 +0100 (CET)","from [192.168.33.103] (185.182.214.224.nat.pool.zt.hu\n\t[185.182.214.224])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BC9324F1;\n\tFri,  6 Mar 2026 08:09:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Ri3uukZs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1772780945;\n\tbh=pTKXJv3OXNg1K02yUhJYkC3U5CEnS06PSNlB6tteN3E=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=Ri3uukZsT6r0xUetlXBtH0cPE2M6szfqxxHDp41tRbDjWFP9gWS7Rf7OevYJDPsD4\n\tA2nMjhVpGZ8O51qovDQTXuKC4vMvcF+0EndyAnwy2Y6o6Hp+jkz/bfax++K0FDhsUf\n\ttCyddWq4x11Isq4hwL4RY1xCf+ClkOnnKW1i1Dcg=","Message-ID":"<e38bba3a-44f8-4b53-9143-5ef774083fba@ideasonboard.com>","Date":"Fri, 6 Mar 2026 08:10:06 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] py: Fix include order","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260220144008.211492-1-barnabas.pocze@ideasonboard.com>\n\t<20260220153305.GB1691215@killaraus.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260220153305.GB1691215@killaraus.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":38341,"web_url":"https://patchwork.libcamera.org/comment/38341/","msgid":"<20260306093600.GA239296@killaraus.ideasonboard.com>","date":"2026-03-06T09:36:00","subject":"Re: [PATCH v2] py: Fix include order","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Mar 06, 2026 at 08:10:06AM +0100, Barnabás Pőcze wrote:\n> 2026. 02. 20. 16:33 keltezéssel, Laurent Pinchart írta:\n> > On Fri, Feb 20, 2026 at 03:40:08PM +0100, Barnabás Pőcze wrote:\n> >> Python.h hence the pybind header must be included first since pyconfig.h\n> >> unconditionally overrides certain feature test macros[0]. This was mostly\n> >> hidden by the fact that macro redefinitions with the same value do not\n> >> trigger compiler warnings. However, glibc 43 has changed certain defaults[1],\n> >> causing mismatches, leading to compiler warnings.\n> >>\n> >> So change the include order so that `<pybind11/...>` headers are included\n> >> first and then the local `\"py_...\"` headers, and then everything else.\n> >>\n> >> Adjust `.clang-format` and the documentation as well.\n> >>\n> >> [0]: https://docs.python.org/3/c-api/intro.html#include-files\n> >> [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=a5cc3018f31a125f019685b239c6e5a0bf1a272b\n> >>\n> >> Link: https://github.com/python/cpython/issues/61322\n> >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >> ---\n> >> changes in v2:\n> >>    * edit documentation\n> >>\n> >> v1: https://patchwork.libcamera.org/patch/26184/\n> >> ---\n> >>   .clang-format                                 |  6 ++++++\n> >>   Documentation/coding-style.rst                |  6 ++++++\n> >>   src/py/libcamera/py_camera_manager.h          |  4 ++--\n> >>   src/py/libcamera/py_color_space.cpp           |  6 +++---\n> >>   src/py/libcamera/py_controls_generated.cpp.in |  4 ++--\n> >>   src/py/libcamera/py_enums.cpp                 |  4 ++--\n> >>   src/py/libcamera/py_formats_generated.cpp.in  |  4 ++--\n> >>   src/py/libcamera/py_geometry.cpp              | 10 +++++-----\n> >>   src/py/libcamera/py_helpers.cpp               |  8 ++++----\n> >>   src/py/libcamera/py_helpers.h                 |  4 ++--\n> >>   src/py/libcamera/py_main.cpp                  | 15 +++++++--------\n> >>   src/py/libcamera/py_main.h                    |  4 ++--\n> >>   src/py/libcamera/py_transform.cpp             |  6 +++---\n> >>   13 files changed, 46 insertions(+), 35 deletions(-)\n> >>\n> >> diff --git a/.clang-format b/.clang-format\n> >> index 7fc30f614..7dbeea784 100644\n> >> --- a/.clang-format\n> >> +++ b/.clang-format\n> >> @@ -77,6 +77,12 @@ IncludeCategories:\n> >>     - Regex:           '<Q([A-Za-z0-9\\-_])+>'\n> >>       CaseSensitive:   true\n> >>       Priority:        9\n> >> +  # Python.h hence pybind11 headers must be included first\n> >> +  # https://docs.python.org/3/c-api/intro.html#include-files\n> >> +  - Regex:           '<pybind11/.*>'\n> >> +    Priority:        -9\n> >> +  - Regex:           '\"py_.*\"'\n> >> +    Priority:        -8\n> >>     # Headers in <> with an extension. (+system libraries)\n> >>     - Regex:           '<([A-Za-z0-9\\-_])+\\.h>'\n> >>       Priority:        2\n> >> diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst\n> >> index 3352b75c7..e0864b78d 100644\n> >> --- a/Documentation/coding-style.rst\n> >> +++ b/Documentation/coding-style.rst\n> >> @@ -95,6 +95,12 @@ System and library headers shall be included with angle brackets. Project\n> >>   headers shall be included with angle brackets for the libcamera public API\n> >>   headers, and with double quotes for internal libcamera headers.\n> >>\n> >> +.. note::\n> >> +   As an exception pybind11 headers and local ``py_*`` headers must be included first\n> >> +   in the Python bindings due to the requirements outlined in the `Python documentation`_.\n> >> +\n> >> +.. _Python documentation: https://docs.python.org/3/c-api/intro.html#include-files\n> >> +\n> >>\n> >>   C++ Specific Rules\n> >>   ------------------\n> >> diff --git a/src/py/libcamera/py_camera_manager.h b/src/py/libcamera/py_camera_manager.h\n> >> index af69b915e..7da65172e 100644\n> >> --- a/src/py/libcamera/py_camera_manager.h\n> >> +++ b/src/py/libcamera/py_camera_manager.h\n> >> @@ -5,12 +5,12 @@\n> >>\n> >>   #pragma once\n> >>\n> >> +#include <pybind11/pybind11.h>\n> >> +\n> >>   #include <libcamera/base/mutex.h>\n> >>\n> >>   #include <libcamera/libcamera.h>\n> >>\n> >> -#include <pybind11/pybind11.h>\n> >> -\n> >>   using namespace libcamera;\n> >>\n> >>   class PyCameraManager\n> >> diff --git a/src/py/libcamera/py_color_space.cpp b/src/py/libcamera/py_color_space.cpp\n> >> index fd5a5dabe..2f4d2d891 100644\n> >> --- a/src/py/libcamera/py_color_space.cpp\n> >> +++ b/src/py/libcamera/py_color_space.cpp\n> >> @@ -5,15 +5,15 @@\n> >>    * Python bindings - Color Space classes\n> >>    */\n> >>\n> >> -#include <libcamera/color_space.h>\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/operators.h>\n> >>   #include <pybind11/pybind11.h>\n> >>   #include <pybind11/stl.h>\n> >>\n> >>   #include \"py_main.h\"\n> >>\n> >> +#include <libcamera/color_space.h>\n> >> +#include <libcamera/libcamera.h>\n> > \n> > While at it you can drop color_space.h as it's included in libcamera.h.\n> > \n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;\n> >> diff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in\n> >> index 22a132d19..c42a477bb 100644\n> >> --- a/src/py/libcamera/py_controls_generated.cpp.in\n> >> +++ b/src/py/libcamera/py_controls_generated.cpp.in\n> >> @@ -7,12 +7,12 @@\n> >>    * This file is auto-generated. Do not edit.\n> >>    */\n> >>\n> >> -#include <libcamera/{{header}}>\n> >> -\n> >>   #include <pybind11/pybind11.h>\n> >>\n> >>   #include \"py_main.h\"\n> >>\n> >> +#include <libcamera/{{header}}>\n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   class Py{{mode|capitalize}}\n> >> diff --git a/src/py/libcamera/py_enums.cpp b/src/py/libcamera/py_enums.cpp\n> >> index 9e75ec1a9..715b63880 100644\n> >> --- a/src/py/libcamera/py_enums.cpp\n> >> +++ b/src/py/libcamera/py_enums.cpp\n> >> @@ -5,12 +5,12 @@\n> >>    * Python bindings - Enumerations\n> >>    */\n> >>\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/pybind11.h>\n> >>\n> >>   #include \"py_main.h\"\n> >>\n> >> +#include <libcamera/libcamera.h>\n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;\n> >> diff --git a/src/py/libcamera/py_formats_generated.cpp.in b/src/py/libcamera/py_formats_generated.cpp.in\n> >> index c5fb90639..bd0ccdc3e 100644\n> >> --- a/src/py/libcamera/py_formats_generated.cpp.in\n> >> +++ b/src/py/libcamera/py_formats_generated.cpp.in\n> >> @@ -7,10 +7,10 @@\n> >>    * This file is auto-generated. Do not edit.\n> >>    */\n> >>\n> >> -#include <libcamera/formats.h>\n> >> -\n> >>   #include <pybind11/pybind11.h>\n> >>\n> >> +#include <libcamera/formats.h>\n> >> +\n> >>   #include \"py_main.h\"\n> >>\n> >>   namespace py = pybind11;\n> >> diff --git a/src/py/libcamera/py_geometry.cpp b/src/py/libcamera/py_geometry.cpp\n> >> index c7e303609..d96015f03 100644\n> >> --- a/src/py/libcamera/py_geometry.cpp\n> >> +++ b/src/py/libcamera/py_geometry.cpp\n> >> @@ -5,17 +5,17 @@\n> >>    * Python bindings - Geometry classes\n> >>    */\n> >>\n> >> -#include <array>\n> >> -\n> >> -#include <libcamera/geometry.h>\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/operators.h>\n> >>   #include <pybind11/pybind11.h>\n> >>   #include <pybind11/stl.h>\n> >>\n> >>   #include \"py_main.h\"\n> >>\n> >> +#include <array>\n> >> +\n> >> +#include <libcamera/geometry.h>\n> >> +#include <libcamera/libcamera.h>\n> > \n> > Same here for geometry.h.\n> > \n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;\n> >> diff --git a/src/py/libcamera/py_helpers.cpp b/src/py/libcamera/py_helpers.cpp\n> >> index 8c55ef845..b9142225c 100644\n> >> --- a/src/py/libcamera/py_helpers.cpp\n> >> +++ b/src/py/libcamera/py_helpers.cpp\n> >> @@ -3,14 +3,14 @@\n> >>    * Copyright (C) 2022, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n> >>    */\n> >>\n> >> -#include \"py_helpers.h\"\n> >> -\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/functional.h>\n> >>   #include <pybind11/stl.h>\n> >>   #include <pybind11/stl_bind.h>\n> >>\n> >> +#include \"py_helpers.h\"\n> >> +\n> >> +#include <libcamera/libcamera.h>\n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;\n> >> diff --git a/src/py/libcamera/py_helpers.h b/src/py/libcamera/py_helpers.h\n> >> index 983969dff..989fae77b 100644\n> >> --- a/src/py/libcamera/py_helpers.h\n> >> +++ b/src/py/libcamera/py_helpers.h\n> >> @@ -5,9 +5,9 @@\n> >>\n> >>   #pragma once\n> >>\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/pybind11.h>\n> >>\n> >> +#include <libcamera/libcamera.h>\n> >> +\n> >>   pybind11::object controlValueToPy(const libcamera::ControlValue &cv);\n> >>   libcamera::ControlValue pyToControlValue(const pybind11::object &ob, libcamera::ControlType type);\n> >> diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\n> >> index a983ea75c..d0ef6915b 100644\n> >> --- a/src/py/libcamera/py_main.cpp\n> >> +++ b/src/py/libcamera/py_main.cpp\n> >> @@ -5,6 +5,13 @@\n> >>    * Python bindings\n> >>    */\n> >>\n> >> +#include <pybind11/functional.h>\n> >> +#include <pybind11/pybind11.h>\n> >> +#include <pybind11/stl.h>\n> >> +#include <pybind11/stl_bind.h>\n> >> +\n> >> +#include \"py_camera_manager.h\"\n> >> +#include \"py_helpers.h\"\n> >>   #include \"py_main.h\"\n> >>\n> >>   #include <limits>\n> >> @@ -17,14 +24,6 @@\n> >>\n> >>   #include <libcamera/libcamera.h>\n> >>\n> >> -#include <pybind11/functional.h>\n> >> -#include <pybind11/pybind11.h>\n> >> -#include <pybind11/stl.h>\n> >> -#include <pybind11/stl_bind.h>\n> >> -\n> >> -#include \"py_camera_manager.h\"\n> >> -#include \"py_helpers.h\"\n> >> -\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;\n> >> diff --git a/src/py/libcamera/py_main.h b/src/py/libcamera/py_main.h\n> >> index 4d594326e..dd31c6d9a 100644\n> >> --- a/src/py/libcamera/py_main.h\n> >> +++ b/src/py/libcamera/py_main.h\n> >> @@ -5,10 +5,10 @@\n> >>\n> >>   #pragma once\n> >>\n> >> -#include <libcamera/base/log.h>\n> >> -\n> >>   #include <pybind11/pybind11.h>\n> >>\n> >> +#include <libcamera/base/log.h>\n> >> +\n> >>   namespace libcamera {\n> >>\n> >>   LOG_DECLARE_CATEGORY(Python)\n> >> diff --git a/src/py/libcamera/py_transform.cpp b/src/py/libcamera/py_transform.cpp\n> >> index 768260ffc..8719b5ff5 100644\n> >> --- a/src/py/libcamera/py_transform.cpp\n> >> +++ b/src/py/libcamera/py_transform.cpp\n> >> @@ -5,15 +5,15 @@\n> >>    * Python bindings - Transform class\n> >>    */\n> >>\n> >> -#include <libcamera/transform.h>\n> >> -#include <libcamera/libcamera.h>\n> >> -\n> >>   #include <pybind11/operators.h>\n> >>   #include <pybind11/pybind11.h>\n> >>   #include <pybind11/stl.h>\n> >>\n> >>   #include \"py_main.h\"\n> >>\n> >> +#include <libcamera/transform.h>\n> >> +#include <libcamera/libcamera.h>\n> > \n> > Same here, drop transform.h.\n> > \n> > No need to resubmit just for this.\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Thanks, done. Any other comments by anyone? Can it be merged?\n\nIf you don't get more reviews by the end of the day I think you can\nmerge the patch.\n\n> >> +\n> >>   namespace py = pybind11;\n> >>\n> >>   using namespace libcamera;","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 11CC0BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Mar 2026 09:36:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E03E4625E5;\n\tFri,  6 Mar 2026 10:36:03 +0100 (CET)","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 33FDC622F1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Mar 2026 10:36:02 +0100 (CET)","from killaraus.ideasonboard.com (85-76-15-83-nat.elisa-mobile.fi\n\t[85.76.15.83])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D857D4F1;\n\tFri,  6 Mar 2026 10:34:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ehA5HqmR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1772789698;\n\tbh=6jBxawE9F/c8VcrPgUSWM33JBGmNoHyx5xHsf0d0+yM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ehA5HqmRJO/9uUtsvoEK1PBP2u0+ooRvL2PYMzAkKuQgz+5TVlAwEoetpGjrp78Xg\n\tUmEFBxYwzEWWBZlWr8DwEtwKOKePF35BvMjaqsyOS84U1oLSVLCPpuK2euhH/80Z/t\n\t3psbrx0C4dz3RzIcS6eMdatar5ixiMWKFuWSp5sM=","Date":"Fri, 6 Mar 2026 10:36:00 +0100","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] py: Fix include order","Message-ID":"<20260306093600.GA239296@killaraus.ideasonboard.com>","References":"<20260220144008.211492-1-barnabas.pocze@ideasonboard.com>\n\t<20260220153305.GB1691215@killaraus.ideasonboard.com>\n\t<e38bba3a-44f8-4b53-9143-5ef774083fba@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<e38bba3a-44f8-4b53-9143-5ef774083fba@ideasonboard.com>","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>"}}]