Skip to contentSkip to conversation

python3-pybind11: install both python wheel and cmake build

PATCH In review Jack Mitchell 2 participants 2 messages Aug 18, 2020 – Aug 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-pybind11: install both python wheel and cmake build

The wheel for this module doesn't install the required cmake files, yet the cmake build doesn't install the required python module files. Therefore use manual calls to the cmake and distutils classes in order to get both into the final package. This method is also what other popular distros use such as Archlinux.

---
 .../python/python3-pybind11_2.5.0.bb             | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-pybind11_2.5.0.bb +15 -1
index 46bba8d8d..9674ec093 100644
@@ -17,4 +17,18 @@ BBCLASSEXTEND = "native"
 
 EXTRA_OECMAKE =  "-DPYBIND11_TEST=OFF"
 
-inherit cmake python3native
+inherit cmake setuptools3 python3native
+
+do_configure() {
+	cmake_do_configure
+}
+
+do_compile() {
+	distutils3_do_compile
+	cmake_do_compile
+}
+
+do_install() {
+	distutils3_do_install
+	cmake_do_install
+}
Signature · 1 line
2.28.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jack Mitchell

The wheel for this module doesn't install the required cmake files, yet the cmake build doesn't install the required python module files. Therefore use manual calls to the cmake and distutils classes in order to get both into the final package. This method is also what other popular distros use such as Archlinux.

Quoted 30 lines
---
  .../python/python3-pybind11_2.5.0.bb             | 16 +++++++++++++++-
  1 file changed, 15 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-pybind11_2.5.0.bb +15 -1
index 46bba8d8d..9674ec093 100644
@@ -17,4 +17,18 @@ BBCLASSEXTEND = "native"
 
  EXTRA_OECMAKE =  "-DPYBIND11_TEST=OFF"
 
-inherit cmake python3native
+inherit cmake setuptools3 python3native
+
+do_configure() {
+	cmake_do_configure
+}
+
+do_compile() {
+	distutils3_do_compile
+	cmake_do_compile
+}
+
+do_install() {
+	distutils3_do_install
+	cmake_do_install
+}