python-thrift: new package
PATCH v2 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 | 7 +++++++ package/python-thrift/python-thrift.mk | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 package/python-thrift/Config.in create mode 100644 package/python-thrift/python-thrift.mk
package/Config.in +1 -0
@@ -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 +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_THRIFT + bool "python-thrift" + 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 +23 -0
@@ -0,0 +1,23 @@ +############################################################# +# +# 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_LICENSE = Apache v2.0 +PYTHON_THRIFT_LICENSE_FILES = README + +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
PATCH v2 1/1 python-thrift: new package
Quoted 10 lines · Vinicius Tinti
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.
Signed-off-by Tiago Maluta <[email protected]>Signed-off-by Vinicius Tinti <[email protected]>
When you post a v2 of a patch, it is nice if you can add a changelog
below your signed-off-by line (separated by ---).
Quoted 26 lines
--- package/Config.in | 1 + package/python-thrift/Config.in | 7 +++++++ package/python-thrift/python-thrift.mk | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+)create mode 100644 package/python-thrift/Config.in create mode 100644
package/python-thrift/python-thrift.mkpackage/Config.in +1
-0@@ -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 +0
-0
package/python-thrift/Config.in line 7
Quoted 7 lines
package/python-thrift/Config.in new file +7
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_THRIFT + bool "python-thrift" + help + python-thrift is a Python bindings for the Apache Thrift RPC system. + + http://thrift.apache.org/ +
Redundant empty line at end of file.
Quoted 6 lines
package/python-thrift/python-thrift.mk new file +0
-0
package/python-thrift/python-thrift.mk line 8
Quoted 8 lines
package/python-thrift/python-thrift.mk new file +8
-0@@ -0,0 +1,23 @@ +############################################################# +# +# python-thrift +# +############################################################# + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
This is the default, so can be removed.
package/python-thrift/python-thrift.mk line 10
Quoted 2 lines
package/python-thrift/python-thrift.mk new file +2
-0+PYTHON_THRIFT_SITE = https://pypi.python.org/packages/source/t/thrift/ +PYTHON_THRIFT_LICENSE = Apache v2.0
We currently have Apache-v2 (ImageMagick), Apache-2.0 (lua-msgpack) and
Apache v2.0 (zxing). I personally prefer Apache-2.0.
package/python-thrift/python-thrift.mk line 21
Quoted 11 lines
package/python-thrift/python-thrift.mk new file +11
-0+PYTHON_THRIFT_LICENSE_FILES = README + +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
Unfortunately, installation fails when host-python-distutilscross has
been installed already (by python-protobuf or python-netifaces).
------
running install
Checking .pth file support in $(TARGET_DIR)/usr/lib/python2.7/site-packages/ $(HOST_DIR)/usr/bin/python -E -c pass
TEST FAILED: $(TARGET_DIR)/usr/lib/python2.7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
$(TARGET_DIR)/usr/lib/python2.7/site-packages/
------
What happens is very clear: we're installing using the host-python,
which doesn't look at TARGET_DIR to load packages. I would expect that distutilscross knows how to deal with that, but haven't found how...
Regards,
Arnout
Quoted 3 lines
package/python-thrift/python-thrift.mk new file +2
-0+ +$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v2 1/1 python-thrift: new package
Quoted 12 lines · Arnout Vandecappelle
Quoted 10 lines · Vinicius Tinti
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.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Tiago Maluta <[email protected]>Signed-off-by Vinicius Tinti <[email protected]>When you post a v2 of a patch, it is nice if you can add a changelog
below your signed-off-by line (separated by ---).
Got it.
Quoted 2 lines
---
Quoted 30 lines
Quoted 30 lines
package/Config.in | 1 + package/python-thrift/Config.**in | 7 +++++++ package/python-thrift/python-**thrift.mk <http://python-thrift.mk> | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+)create mode 100644 package/python-thrift/Config.**in
create mode 100644 package/python-thrift/python-**thrift.mk<http://python-thrift.mk>package/Config.in +1
-0@@ -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/** renamed from package/python-thrift/**Config.in +0
-0Config.in
new file mode 100644
index 0000000..f4ad4bapackage/python-thrift/**Config.in new file +3
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_THRIFT + bool "python-thrift" + help
Quoted 10 lines
package/python-thrift/**Config.in
Quoted 6 lines
package/python-thrift/**Config.in new file +1
-0+ python-thrift is a Python bindings for the Apache Thrift RPCsystem.
package/python-thrift/**Config.in new file +3
-0+ + http://thrift.apache.org/ +Redundant empty line at end of file.
Ok. I will remove. Note that there are other python modules that are with this (i.e. python-serial).
Quoted 10 lines
diff --git a/package/python-thrift/python**-thrift.mk<http://python-thrift.mk>b/package/python-thrift/
Quoted 9 lines
python**-thrift.mk <http://python-thrift.mk>
new file mode 100644
index 0000000..40ae57bpackage/python-thrift/python**-thrift.mk <http://python-thrift.mk> new file +3
-0@@ -0,0 +1,23 @@ +#############################**##############################**## +# +# python-thrift
Quoted 10 lines
package/python-thrift/python**-thrift.mk <http://python-thrift.mk> line 8
Quoted 6 lines
package/python-thrift/python**-thrift.mk <http://python-thrift.mk> new file +5
-0+# +#############################**##############################**## + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_**VERSION).tar.gzThis is the default, so can be removed.
Can I keep it? I think it makes more clear.
Quoted 8 lines
+PYTHON_THRIFT_SITE = https://pypi.python.org/**packages/source/t/thrift/<https://pypi.python.org/packages/source/t/thrift/>
package/python-thrift/python**-thrift.mk <http://python-thrift.mk> line 9
Quoted 2 lines
package/python-thrift/python**-thrift.mk <http://python-thrift.mk> new file +1
-0+PYTHON_THRIFT_LICENSE = Apache v2.0We currently have Apache-v2 (ImageMagick), Apache-2.0 (lua-msgpack) and
Apache v2.0 (zxing). I personally prefer Apache-2.0.
Changed to Apache-2.0.
Quoted 19 lines
+PYTHON_THRIFT_LICENSE_FILES = README
package/python-thrift/python**-thrift.mk <http://python-thrift.mk>
Quoted 12 lines
package/python-thrift/python**-thrift.mk <http://python-thrift.mk> new file +10
-1+ +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) +endefUnfortunately, installation fails when host-python-distutilscross has
been installed already (by python-protobuf or python-netifaces).
------
Quoted 13 lines
running install
Checking .pth file support in $(TARGET_DIR)/usr/lib/python2.** 7/site-packages/
$(HOST_DIR)/usr/bin/python -E -c pass
TEST FAILED: $(TARGET_DIR)/usr/lib/python2.**7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATHYou are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
Quoted 8 lines
$(TARGET_DIR)/usr/lib/python2.**7/site-packages/------
What happens is very clear: we're installing using the host-python, which
doesn't look atTARGET_DIRto load packages. I would expect that distutilscross knows how to deal with that, but haven't found how...
I have used the code from python-netifaces. It builds without generating an error at least. Do you think it is ok?
+define PYTHON_THRIFT_BUILD_CMDS
+ (cd $(@D); \
+ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
+ LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+ $(HOST_DIR)/usr/bin/python setup.py build -x)
+endef
+
+define PYTHON_THRIFT_INSTALL_TARGET_CMDS
+ (cd $(@D);
PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+ $(HOST_DIR)/usr/bin/python setup.py install
--prefix=$(TARGET_DIR)/usr)
+endef
Quoted 8 lines
Regards,
Arnout+
Quoted 3 lines
+$(eval $(generic-package))
Quoted 8 lines
--
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/**arnoutvandecappelle<http://www.linkedin.com/in/arnoutvandecappelle> GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Best regards,
Tinti
Signature · 4 lines
Simplicity is the ultimate sophistication -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130314/eb562bb0/attachment.html>
PATCH v3 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.
---
Changes since v2:
1. Remove empty line in Config.in
2. Change to Apache-2.0
3. Solve python-thrift, python-protobuf and python-netifaces conflict
--- package/Config.in | 1 + package/python-thrift/Config.in | 7 +++++++ package/python-thrift/python-thrift.mk | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/python-thrift/Config.in create mode 100644 package/python-thrift/python-thrift.mk
package/Config.in +1 -0
@@ -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 +7 -0
@@ -0,0 +1,7 @@ +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 +27 -0
@@ -0,0 +1,27 @@ +############################################################# +# +# 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_LICENSE = Apache-2.0 +PYTHON_THRIFT_LICENSE_FILES = README + +PYTHON_THRIFT_DEPENDENCIES = python + +define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_THRIFT_INSTALL_TARGET_CMDS + (cd $(@D); 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))
Signature · 1 line
1.7.9.5
PATCH v3 1/1 python-thrift: new package
Quoted 10 lines · Vinicius Tinti
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.
Signed-off-by Tiago Maluta <[email protected]>Signed-off-by Vinicius Tinti <[email protected]>
Still some remarks below, up to Peter to decide if they need to be
fixed before committing.
[snip]
Quoted 6 lines
package/python-thrift/python-thrift.mk new file +0
-0
package/python-thrift/python-thrift.mk line 8
Quoted 8 lines
package/python-thrift/python-thrift.mk new file +8
-0@@ -0,0 +1,27 @@ +############################################################# +# +# python-thrift +# +############################################################# + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
Redundant.
package/python-thrift/python-thrift.mk line 9
Quoted 1 line
package/python-thrift/python-thrift.mk new file +1
-0+PYTHON_THRIFT_SITE = https://pypi.python.org/packages/source/t/thrift/
Should be http rather than https, and the final / is redundant.
package/python-thrift/python-thrift.mk line 19
Quoted 10 lines
package/python-thrift/python-thrift.mk new file +10
-0+PYTHON_THRIFT_LICENSE = Apache-2.0 +PYTHON_THRIFT_LICENSE_FILES = README + +PYTHON_THRIFT_DEPENDENCIES = python + +define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build)
This should be indented one tab more.
package/python-thrift/python-thrift.mk line 21
Quoted 2 lines
package/python-thrift/python-thrift.mk new file +2
-0+endef +
Missing comment:
# host-distutilscross, if it has been installed before, will check that
# the installation directory is in python's load path. For host-python, # it is not, so add it explicitly while installing to target.
package/python-thrift/python-thrift.mk line 27
Quoted 7 lines
package/python-thrift/python-thrift.mk new file +6
-0+define PYTHON_THRIFT_INSTALL_TARGET_CMDS + (cd $(@D); 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))
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v4 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.
---
Changes since v2:
1. Remove empty line in Config.in
2. Change to Apache-2.0
3. Solve python-thrift, python-protobuf and python-netifaces conflict Changes since v3:
1. Add workaround comment. Suggested by Arnout
2. Fix extra / and https in package URL
3. Change indentation
4. Acked by Arnout
5. Tested by Arnout
---
--- package/Config.in | 1 + package/python-thrift/Config.in | 7 +++++++ package/python-thrift/python-thrift.mk | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 package/python-thrift/Config.in create mode 100644 package/python-thrift/python-thrift.mk
package/Config.in +1 -0
@@ -332,6 +332,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 +7 -0
@@ -0,0 +1,7 @@ +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 +30 -0
@@ -0,0 +1,30 @@ +############################################################# +# +# python-thrift +# +############################################################# + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz +PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift +PYTHON_THRIFT_LICENSE = Apache-2.0 +PYTHON_THRIFT_LICENSE_FILES = README + +PYTHON_THRIFT_DEPENDENCIES = python + +define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +# host-distutilscross, if it has been installed before, will check that +# the installation directory is in python's load path. For host-python, +# it is not, so add it explicitly while installing to target. +define PYTHON_THRIFT_INSTALL_TARGET_CMDS + (cd $(@D); 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))
Signature · 1 line
1.7.9.5
PATCH v4 1/1 python-thrift: new package
Quoted 5 lines · Vinicius Tinti
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).
Quoted 7 lines
This patch does not include the Thrift code generator. It only includes the Thrift libraries used at runtime.
Signed-off-by Tiago Maluta <[email protected]>Signed-off-by Vinicius Tinti <[email protected]>
Committed, thanks.
--
Bye, Peter Korsgaard
PATCH v2 1/1 python-thrift: new package
In reply to TintiQuoted 4 lines · Tinti
On Wed, Mar 13, 2013 at 5:35 PM, Arnout Vandecappelle <[email protected] <mailto:[email protected]>> wrote:
On 03/13/13 15:43, Vinicius Tinti wrote:
[snip]
Quoted 20 lines
b/package/python-thrift/python__-thrift.mk <http://python-thrift.mk> new file mode 100644 index 0000000..40ae57b --- /dev/null +++ b/package/python-thrift/python__-thrift.mk <http://python-thrift.mk> @@ -0,0 +1,23 @@ +#############################__##############################__## +# +# python-thrift +# +#############################__##############################__## + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz This is the default, so can be removed.
Quoted 1 line
Can I keep it? I think it makes more clear.
Although I agree, the rule in buildroot is that it is removed when it
is the default. So no, you cannot keep it.
Quoted 7 lines
+PYTHON_THRIFT_SITE =
https://pypi.python.org/__packages/source/t/thrift/
<https://pypi.python.org/packages/source/t/thrift/>
+PYTHON_THRIFT_LICENSE = Apache v2.0
Quoted 5 lines
We currently have Apache-v2 (ImageMagick), Apache-2.0 (lua-msgpack)
and Apache v2.0 (zxing). I personally prefer Apache-2.0.Changed to Apache-2.0.
Apache-2.0 is just my personal preference, so wait a bit until some
others have voiced their opinion.
Quoted 34 lines
+PYTHON_THRIFT_LICENSE_FILES = README +
+PYTHON_THRIFT_DEPENDENCIES = python +
+definePYTHON_THRIFT_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/pythonsetup.pybuild)
+endef
+
+definePYTHON_THRIFT_INSTALL_TARGET___CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/pythonsetup.pyinstall
--prefix=$(TARGET_DIR)/usr)
+endefUnfortunately, installation fails when host-python-distutilscross
has been installed already (by python-protobuf or python-netifaces).------
running install
Checking .pth file support in $(TARGET_DIR)/usr/lib/python2.__7/site-packages/ $(HOST_DIR)/usr/bin/python -E -c pass
TEST FAILED: $(TARGET_DIR)/usr/lib/python2.__7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATHYou are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
$(TARGET_DIR)/usr/lib/python2.__7/site-packages/
------
Quoted 8 lines
What happens is very clear: we're installing using the host-python,
which doesn't look atTARGET_DIRto load packages. I would expect that distutilscross knows how to deal with that, but haven't found how...I have used the code from python-netifaces. It builds without generating an error at least. Do you think it is ok?
Strange... Can you check that if you first build
host-python-distutilscross and then python-thrift, it still works for you? So:
make python-distutilscross
make python-thrift-dirclean
make python-thrift
And a sanity check: do you use current git master as a base?
Quoted 12 lines
(quoted diff) +9
-0+define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build -x) +endef + +define PYTHON_THRIFT_INSTALL_TARGET_CMDS + (cd $(@D);PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
Review
Quoted 3 lines
(quoted diff) +2
-1+ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef
I have no problem with this workaround, even though it is a bit ugly.
You should add a comment to explain why this is needed though (before the define, otherwise the comment is interrupting the backslashified region).
When you send a new patch with this change, I'll test it in my environment.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v2 1/1 python-thrift: new package
Quoted 31 lines · Arnout Vandecappelle
Quoted 5 lines · Tinti
On Wed, Mar 13, 2013 at 5:35 PM, Arnout Vandecappelle <[email protected] <mailto:[email protected]>> wrote:
On 03/13/13 15:43, Vinicius Tinti wrote:[snip]
Quoted 22 lines
b/package/python-thrift/python**__-thrift.mk<http://python__-thrift.mk><new file mode 100644 index 0000000..40ae57b --- /dev/null +++ b/package/python-thrift/python**__-thrift.mk<http://python__-thrift.mk> <http://python-thrift.mk> @@ -0,0 +1,23 @@ +#############################**__############################** ##__## +# +# python-thrift +# +#############################**__############################**##__##
+ +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_**VERSION).tar.gz
Quoted 9 lines
Quoted 5 lines
This is the default, so can be removed.
Can I keep it? I think it makes more clear.
Although I agree, the rule in buildroot is that it is removed when it is
the default. So no, you cannot keep it.
Ok.
Quoted 14 lines
Quoted 14 lines
+PYTHON_THRIFT_SITE = https://pypi.python.org/__**packages/source/t/thrift/<https://pypi.python.org/__packages/source/t/thrift/> <https://pypi.python.org/**packages/source/t/thrift/<https://pypi.python.org/packages/source/t/thrift/>Quoted 1 line
+PYTHON_THRIFT_LICENSE = Apache v2.0
We currently have Apache-v2 (ImageMagick), Apache-2.0 (lua-msgpack)
and Apache v2.0 (zxing). I personally prefer Apache-2.0.
Quoted 7 lines
Quoted 2 lines
Changed to Apache-2.0.
Apache-2.0 is just my personal preference, so wait a bit until some
others have voiced their opinion.
Right.
Quoted 52 lines
+PYTHON_THRIFT_LICENSE_FILES = README
Quoted 43 lines
+
+PYTHON_THRIFT_DEPENDENCIES = python +
+definePYTHON_THRIFT_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/pythonsetup.pybuild)
+endef
+
+define PYTHON_THRIFT_INSTALL_TARGET__**_CMDS+ (cd $(@D); $(HOST_DIR)/usr/bin/python
setup.pyinstall
--prefix=$(TARGET_DIR)/usr)
+endefUnfortunately, installation fails when host-python-distutilscross
has been installed already (by python-protobuf or python-netifaces).------
running install
Checking .pth file support in $(TARGET_DIR)/usr/lib/python2.**__7/site-packages/ $(HOST_DIR)/usr/bin/python -E -c pass
TEST FAILED: $(TARGET_DIR)/usr/lib/python2.**__7/site-packages/ doesNOT support .pth files
error: bad install directory or PYTHONPATHYou are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
$(TARGET_DIR)/usr/lib/python2.**__7/site-packages/
------
What happens is very clear: we're installing using the host-python,
which doesn't look atTARGET_DIRto load packages. I would expect that distutilscross knows how to deal with that, but haven't found
how...Quoted 3 lines
I have used the code from python-netifaces. It builds without generating an error at least. Do you think it is ok?
Strange... Can you check that if you first build
host-python-distutilscross and then python-thrift, it still works for you? So:
Quoted 7 lines
make python-distutilscross
make python-thrift-dirclean
make python-thriftAnd a sanity check: do you use current git master as a base?
Yes, I am using git://git.buildroot.net/buildroot. But I dont have the python-distutilscross target available. I have tried even to enable all python modules. Am I doing something wrong?
Quoted 14 lines
Quoted 14 lines
(quoted diff) +9
-0+define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)**/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build -x) +endef + +define PYTHON_THRIFT_INSTALL_TARGET_**CMDS + (cd $(@D);PYTHONPATH=$(TARGET_DIR)/usr/**lib/python$(PYTHON_VERSION_** MAJOR)/site-packages
\
+ $(HOST_DIR)/usr/bin/pythonsetup.pyinstall
Quoted 10 lines
Quoted 3 lines
--prefix=$(TARGET_DIR)/usr)
+endefI have no problem with this workaround, even though it is a bit ugly. You
should add a comment to explain why this is needed though (before the define, otherwise the comment is interrupting the backslashified region).
I have simply copy how python-protocolbuf and python-netifaces are doing the installation. But the truth is that I don't really know why it must be done this way. By the code we can see that it uses an intermediate directory.
Do you think that /* Avoid directory conflicts by using an intermediate install directory. Needed to work with python-protocolbuf and python-netifaces. */ is enough?
Quoted 7 lines
When you send a new patch with this change, I'll test it in my
environment.Regards,
Arnout
Quoted 8 lines
--
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/**arnoutvandecappelle<http://www.linkedin.com/in/arnoutvandecappelle> GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Best regards.
Tinti
Signature · 4 lines
Simplicity is the ultimate sophistication -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130317/53a73dbd/attachment-0001.html>