Skip to contentSkip to conversation

python-thrift: new package

PATCH Superseded Vinicius Tinti 2 participants 3 messages Mar 12, 2013 – Mar 13, 2013

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-thrift: new package

Add Python bindings for the Apache Thrift RPC.

Thrift is an interface definition language that is used to define and create services for numerous languages using remote procedure calls (RPC).

This patch does not include the Thrift code generator. It only includes the Thrift libraries used at runtime.

---
 package/Config.in                      |    1 +
 package/python-thrift/Config.in        |    8 ++++++++
 package/python-thrift/python-thrift.mk |   21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 package/python-thrift/Config.in
 create mode 100644 package/python-thrift/python-thrift.mk
package/Config.in +1 -0
index a65054c..8467735 100644
@@ -334,6 +334,7 @@ source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
+source "package/python-thrift/Config.in"
 endmenu
 endif
 source "package/ruby/Config.in"
package/python-thrift/Config.in new file +8 -0
new file mode 100644
index 0000000..3aa6bfb
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_THRIFT
+	bool "python-thrift"
+	depends on BR2_PACKAGE_PYTHON
+	help
+	  python-thrift is a Python bindings for the Apache Thrift RPC system.
+
+	  http://thrift.apache.org/
+
package/python-thrift/python-thrift.mk new file +21 -0
new file mode 100644
index 0000000..00bb90c
@@ -0,0 +1,21 @@
+#############################################################
+#
+# python-thrift
+#
+#############################################################
+
+PYTHON_THRIFT_VERSION = 0.9.0
+PYTHON_THRIFT_SOURCE  = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
+PYTHON_THRIFT_SITE    = https://pypi.python.org/packages/source/t/thrift/
+
+PYTHON_THRIFT_DEPENDENCIES = python
+
+define PYTHON_THRIFT_BUILD_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_THRIFT_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 python-thrift: new package

Dear Vinicius Tinti,

package/python-thrift/Config.in line 3

Quoted 9 lines · Vinicius Tinti
package/python-thrift/Config.in new file +3 -0
new file mode 100644
index 0000000..3aa6bfb
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_THRIFT
+	bool "python-thrift"
+	depends on BR2_PACKAGE_PYTHON

The "depends on BR2_PACKAGE_PYTHON" here is not needed, since the 'source "package/python-thrift/Config.in"' in package/Config.in is already enclosed in a if BR2_PACKAGE_PYTHON...endif.

package/python-thrift/Config.in line 6

Quoted 3 lines
package/python-thrift/Config.in new file +3 -0
+PYTHON_THRIFT_VERSION = 0.9.0
+PYTHON_THRIFT_SOURCE  = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
+PYTHON_THRIFT_SITE    = https://pypi.python.org/packages/source/t/thrift/

Could you add PYTHON_THRIFT_LICENSE and PYTHON_THRIFT_LICENSE_FILES ?

Otherwise, looks good to me.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 python-thrift: new package

Yes, sure.

But about BR2_PACKAGE_PYTHON I have seen that many other python-<module> use it. Since I get 'python-serial' as template I thought it was mandatory.

Should I really remove it?

Quoted 34 lines · Thomas Petazzoni

Dear Vinicius Tinti,

Review

Quoted 1 line · Vinicius Tinti
(quoted diff) +0 -0

b/package/python-thrift/Config.in

package/python-thrift/Config.in line 3

Quoted 8 lines

new file mode 100644
index 0000000..3aa6bfb

package/python-thrift/Config.in new file +3 -0
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_THRIFT
+     bool "python-thrift"
+     depends on BR2_PACKAGE_PYTHON

The "depends on BR2_PACKAGE_PYTHON" here is not needed, since the 'source "package/python-thrift/Config.in"' in package/Config.in is already enclosed in a if BR2_PACKAGE_PYTHON...endif.

package/python-thrift/Config.in line 6

Quoted 3 lines
package/python-thrift/Config.in new file +3 -0
+PYTHON_THRIFT_VERSION = 0.9.0
+PYTHON_THRIFT_SOURCE  = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
+PYTHON_THRIFT_SITE    =

https://pypi.python.org/packages/source/t/thrift/

Could you add PYTHON_THRIFT_LICENSE and PYTHON_THRIFT_LICENSE_FILES ?

Otherwise, looks good to me.

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Signature · 4 lines
Simplicity is the ultimate sophistication
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130313/fb572316/attachment.html>