[meta-virtualization] [PATCH 2/5] protobuf: add python support

Keith Holman Keith.Holman at windriver.com
Wed Aug 20 13:46:08 PDT 2014


The compiler generated by Google Protocol Buffers currently includes
support for Python bindings.  However, currently the python files
required to use the generated files are not included on the system.
This fix installs the python header files using python setup-tools
after the compiler is built.

Signed-off-by: Keith Holman <Keith.Holman at windriver.com>
---
 recipes-containers/criu/protobuf_2.5.0.bb | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/recipes-containers/criu/protobuf_2.5.0.bb b/recipes-containers/criu/protobuf_2.5.0.bb
index 4a90b2c..a9a26d8 100644
--- a/recipes-containers/criu/protobuf_2.5.0.bb
+++ b/recipes-containers/criu/protobuf_2.5.0.bb
@@ -13,8 +13,22 @@ PR = "r0"
 SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8"
 SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e"
 SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz"
+PYTHON_SRC_DIR="python"
 
 EXTRA_OECONF += " --with-protoc=echo"
-inherit autotools
+inherit autotools setuptools
+
+do_compile() {
+    # Compile protoc compiler
+    base_do_compile
+}
+
+do_install() {
+    # Install protoc compiler
+    autotools_do_install
+    # Install header files
+    cd "${PYTHON_SRC_DIR}"
+    distutils_do_install
+}
 
 BBCLASSEXTEND = "native nativesdk"
-- 
1.9.3



More information about the meta-virtualization mailing list