[libcamera-devel] [RFC 1/4] Add pybind11 submodule
Kieran Bingham
kieran.bingham at ideasonboard.com
Fri Sep 18 17:38:08 CEST 2020
Hello again,
On 18/09/2020 16:33, Kieran Bingham wrote:
> Hi Tomi,
>
> Thank you very much for your work on python bindings, this is very exciting.
>
>
> On 18/09/2020 16:20, Tomi Valkeinen wrote:
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>
>
> I haven't had chance to go through everything yet, but for pulling in
> the pybind11 dependency, I suspect this should be handled through the
> meson dependecy/wrap framework.
>
> https://mesonbuild.com/Wrap-dependency-system-manual.html
>
> I've never used it, so I'm not quite sure how that works yet - but I
> don't think we should expect users to have to wrangle the git submodules
> themselves before starting a build.
>
There appears to be a somewhat officialish pybind11 'wrap' here:
https://github.com/mesonbuild/pybind11/blob/2.3.0/upstream.wrap
Although,
https://github.com/mesonbuild/meson/issues/4677#issuecomment-457949493
Implies that it can be handled natively through the meson build
system/python integrations ... Not sure I understood the right path yet:
> project('pybindtest', 'cpp', default_options : ['cpp_std=c++11',])
> pymod = import('python')
> py = pymod.find_installation('python3')
> py.extension_module('example', sources : 'example.cpp', dependencies : dependency('python3'))
I'll try to explore it next week if you haven't had chance to investigate.
--
Regards
Kieran
> --
> Kieran
>
>
>
>> ---
>> .gitmodules | 3 +++
>> ext/pybind11 | 1 +
>> 2 files changed, 4 insertions(+)
>> create mode 100644 .gitmodules
>> create mode 160000 ext/pybind11
>>
>> diff --git a/.gitmodules b/.gitmodules
>> new file mode 100644
>> index 0000000..c6d1083
>> --- /dev/null
>> +++ b/.gitmodules
>> @@ -0,0 +1,3 @@
>> +[submodule "ext/pybind11"]
>> + path = ext/pybind11
>> + url = https://github.com/pybind/pybind11.git
>> diff --git a/ext/pybind11 b/ext/pybind11
>> new file mode 160000
>> index 0000000..3b1dbeb
>> --- /dev/null
>> +++ b/ext/pybind11
>> @@ -0,0 +1 @@
>> +Subproject commit 3b1dbebabc801c9cf6f0953a4c20b904d444f879
>>
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list