Commit 0c5e24d4 authored by Thiago Correa's avatar Thiago Correa Committed by Peter Korsgaard
Browse files

python-protobuf: Add support for Python implementation of Google's Protocol Buffers

parent eed671a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ source "package/python-mad/Config.in"
source "package/python-meld3/Config.in"
source "package/python-netifaces/Config.in"
source "package/python-nfc/Config.in"
source "package/python-protobuf/Config.in"
source "package/python-pygame/Config.in"
source "package/python-serial/Config.in"
source "package/python-setuptools/Config.in"
+10 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_PYTHON_PROTOBUF
	bool "python-protobuf"
	depends on BR2_PACKAGE_PYTHON
	help
	  Python implementation of the Google Protocol Buffers.

	  Protocol buffers are Google's language-neutral, platform-neutral,
	  extensible mechanism for serializing structured data.

	  http://code.google.com/p/protobuf/
+28 −0
Original line number Diff line number Diff line
#############################################################
#
# python-protobuf
#
#############################################################

PYTHON_PROTOBUF_VERSION = $(PROTOBUF_VERSION)
PYTHON_PROTOBUF_SOURCE  = $(PROTOBUF_SOURCE)
PYTHON_PROTOBUF_SITE    = $(PROTOBUF_SITE)
PYTHON_PROTOBUF_LICENSE = BSD-3c
PYTHON_PROTOBUF_LICENSE_FILES = COPYING.txt

PYTHON_PROTOBUF_DEPENDENCIES = python host-python-setuptools \
        host-python-distutilscross host-protobuf

define PYTHON_PROTOBUF_BUILD_CMDS
	(cd $(@D)/python; \
		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
		PATH=$(HOST_PATH) \
	$(HOST_DIR)/usr/bin/python setup.py build -x)
endef

define PYTHON_PROTOBUF_INSTALL_TARGET_CMDS
	(cd $(@D)/python; PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
	$(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
endef

$(eval $(generic-package))