Skip to contentSkip to conversation

pybind11: new package

Buildroot [email protected] 1 participant 1 message Nov 13, 2021

lore
Share & tools
lore
#0 lore raw

From: "Guillaume W. Bres" <[email protected]>

fixes http://autobuild.buildroot.net/results/d2f0a0ad8f6c7178517df109e7d885dac9134c3a
fixes http://autobuild.buildroot.net/results/b57e9a3279260dae4a590f9421238fcabb2f7cab
fixes http://autobuild.buildroot.net/results/515e6f2fc6b5780260d98d6bb52b541ce4bf1afe
fixes http://autobuild.buildroot.net/results/d89c4ecc81222d4f80c951da2232d2e393fa1c69
list goes on..

---
python-pybind was not the right approach and is in failure since it's been upgraded to V2.6.1.

Building with setup.py now requires a cmake build first.
With this new approach we can build the package with cmake
for python bindings in C++ AND we also have the
C++ bindings in python as an option (depending & requiring the first one).

I make this a host-only package, in the sense that other packages will require it at build time, and I don't forsee any reasons to have such a package as a target package.

---
 DEVELOPERS                               |  2 +-
 package/Config.in                        |  2 +-
 package/pybind11/Config.in               | 25 ++++++++++++++
 package/pybind11/pybind11.hash           |  3 ++
 package/pybind11/pybind11.mk             | 42 ++++++++++++++++++++++++
 package/python-pybind/Config.in          |  8 -----
 package/python-pybind/python-pybind.hash |  4 ---
 package/python-pybind/python-pybind.mk   | 13 --------
 8 files changed, 72 insertions(+), 27 deletions(-)
 create mode 100644 package/pybind11/Config.in
 create mode 100644 package/pybind11/pybind11.hash
 create mode 100644 package/pybind11/pybind11.mk
 delete mode 100644 package/python-pybind/Config.in
 delete mode 100644 package/python-pybind/python-pybind.hash
 delete mode 100644 package/python-pybind/python-pybind.mk
DEVELOPERS +1 -1
index 6f812eb564..e5e6d0f538 100644
@@ -1104,7 +1104,7 @@ F:	package/libnids/
 F:	package/libxcrypt/
 F:	package/liquid-dsp/
 F:	package/pixiewps/
-F:	package/python-pybind/
+F:	package/pybind11/
 F:	package/reaver/
 
 N:	Guo Ren <[email protected]>
package/Config.in +1 -1
index e355ab1987..7d36c22d0e 100644
@@ -1132,7 +1132,6 @@ menu "External python modules"
 	source "package/python-pyalsa/Config.in"
 	source "package/python-pyasn1/Config.in"
 	source "package/python-pyasn1-modules/Config.in"
-	source "package/python-pybind/Config.in"
 	source "package/python-pycairo/Config.in"
 	source "package/python-pycares/Config.in"
 	source "package/python-pycli/Config.in"
@@ -2005,6 +2004,7 @@ endif
 	source "package/protobuf/Config.in"
 	source "package/protobuf-c/Config.in"
 	source "package/protozero/Config.in"
+	source "package/pybind11/Config.in"
 	source "package/qhull/Config.in"
 	source "package/qlibc/Config.in"
 	source "package/riemann-c-client/Config.in"
package/pybind11/Config.in new file +25 -0
new file mode 100644
index 0000000000..cc3d481ccc
@@ -0,0 +1,25 @@
+comment "pybind11 needs a toolchain w/ C++, wchar"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
+
+config BR2_PACKAGE_PYBIND11
+	bool "pybind11"
+	depends on BR2_USE_WCHAR # boost
+	depends on BR2_INSTALL_LIBSTDCPP # boost
+	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
+	select BR2_PACKAGE_BOOST
+	help
+	  Pybind11 is a lightweight header-only library that exposes C++
+	  types in Python and vice versa, mainly to create Python
+	  bindings of existing C++ code.
+
+	  http://pybind11.readthedocs.org/en/master
+
+if BR2_PACKAGE_PYBIND11
+
+config BR2_PACKAGE_PYBIND11_WITH_PYTHON
+	bool "pybind11-python"
+	depends on BR2_PACKAGE_PYTHON3
+	help
+	  Activate support for python-pybind
+
+endif
package/pybind11/pybind11.hash new file +3 -0
new file mode 100644
index 0000000000..ab8825bf04
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc  pybind11-2.8.1.tar.gz
+sha256 83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb  LICENSE
package/pybind11/pybind11.mk new file +42 -0

42 lines not on this page · raw message

package/python-pybind/Config.in deleted +0 -8
deleted file mode 100644
index 604cb9ee67..0000000000
@@ -1,8 +0,0 @@
-config BR2_PACKAGE_PYTHON_PYBIND
-	bool "python-pybind"
-	help
-	  PyBind is a lightweight header-only library that exposes C++
-	  types in Python and vice versa, mainly to create Python
-	  bindings of existing C++ code.
-
-	  http://pybind11.readthedocs.org/en/master
package/python-pybind/python-pybind.hash deleted +0 -4
deleted file mode 100644
index a68ac846e2..0000000000
@@ -1,4 +0,0 @@
-# Locally calculated
-sha256  cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a  python-pybind-2.6.1.tar.gz
-# License files, locally calculated
-sha256  83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb  LICENSE
package/python-pybind/python-pybind.mk deleted +0 -13
deleted file mode 100644
index a6a1bdb976..0000000000
@@ -1,13 +0,0 @@
-################################################################################
-#
-# python-pybind
-#
-################################################################################
-
-PYTHON_PYBIND_VERSION = 2.6.1
-PYTHON_PYBIND_SITE = $(call github,pybind,pybind11,v$(PYTHON_PYBIND_VERSION))
-PYTHON_PYBIND_LICENSE = BSD-3-Clause
-PYTHON_PYBIND_LICENSE_FILES = LICENSE
-PYTHON_PYBIND_SETUP_TYPE = setuptools
-
-$(eval $(python-package))
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot