diff options
authorFlorian Franzmann2019-09-20 18:46:08 +0200
committerFlorian Franzmann2019-09-25 21:35:30 +0200
commit1d4f700b419a42b211d10df2c81ecbf0c7eb9bae (patch)
parent90c22c4f2aa30793693d226c48c64de89958d270 (diff)
devel/pybind11: new spell, a C++11/Python binding generator
6 files changed, 47 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 586a531bca..ba13635535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
2019-09-23 Vlad Glagolev <>
* crypto/libsodium: moved from libs
+2019-09-20 Florian Franzmann <>
+ * devel/pybind11: new spell, a C++11/Python binding generator
2019-09-18 Ismael Luceno <>
* audio-libs/portmidi: new spell, Platform Independent Library for
diff --git a/devel/pybind11/BUILD b/devel/pybind11/BUILD
new file mode 100755
index 0000000000..16337b6b1a
--- /dev/null
+++ b/devel/pybind11/BUILD
@@ -0,0 +1,2 @@
diff --git a/devel/pybind11/CONFIGURE b/devel/pybind11/CONFIGURE
new file mode 100755
index 0000000000..b2f02c3032
--- /dev/null
+++ b/devel/pybind11/CONFIGURE
@@ -0,0 +1 @@
diff --git a/devel/pybind11/DEPENDS b/devel/pybind11/DEPENDS
new file mode 100755
index 0000000000..f024b8eec4
--- /dev/null
+++ b/devel/pybind11/DEPENDS
@@ -0,0 +1,3 @@
+depends gcc &&
+depends PYTHON
diff --git a/devel/pybind11/DETAILS b/devel/pybind11/DETAILS
new file mode 100755
index 0000000000..e42a5b6248
--- /dev/null
+++ b/devel/pybind11/DETAILS
@@ -0,0 +1,35 @@
+ SPELL=pybind11
+ VERSION=2.4.1
+ SOURCE_URL[0]=${SPELL}/archive/v${VERSION}.tar.gz
+ SOURCE_HASH=sha512:4f1308f9db8d35ed2eea2a2bcb5f9fa08ccac0d86cdf686859f49d22c38da1dce2599531781bc8fef8f8b86f0eec82dd81870449022f29d508feb5a424e563fb
+ ENTERED=20190920
+ SHORT="a lightweight header-only library that exposes C++ types in Python and vice versa"
+cat << EOF
+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. Its
+goals and syntax are similar to the excellent Boost.Python library by David
+Abrahams: to minimize boilerplate code in traditional extension modules by
+inferring type information using compile-time introspection.
+The main issue with Boost.Python—and the reason for creating such a
+similar project—is Boost. Boost is an enormously large and complex
+suite of utility libraries that works with almost every C++ compiler in
+existence. This compatibility has its cost: arcane template tricks and
+workarounds are necessary to support the oldest and buggiest of compiler
+specimens. Now that C++11-compatible compilers are widely available, this
+heavy machinery has become an excessively large and unnecessary dependency.
+Think of this library as a tiny self-contained version of Boost.Python with
+everything stripped away that isn't relevant for binding generation. Without
+comments, the core header files only require ~4K lines of code and depend
+on Python (2.7 or 3.x, or PyPy2.7 >= 5.7) and the C++ standard library. This
+compact implementation was possible thanks to some of the new C++11 language
+features (specifically: tuples, lambda functions and variadic templates). Since
+its creation, this library has grown beyond Boost.Python in many ways,
+leading to dramatically simpler binding code in many common situations.
diff --git a/devel/pybind11/HISTORY b/devel/pybind11/HISTORY
new file mode 100644
index 0000000000..b423ec68b1
--- /dev/null
+++ b/devel/pybind11/HISTORY
@@ -0,0 +1,3 @@
+2019-09-20 Florian Franzmann <>