* [ptxdist] [PATCH v2 1/4] host-cython: add CROSS_CYTHON_ENV declaration
2014-03-25 19:53 [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Alexander Aring
@ 2014-03-25 19:53 ` Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 2/4] python-routing: add new package Alexander Aring
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-03-25 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
This patch adds a CROSS_CYTHON_ENV declaration to the host-cython make
rule file. Cython usually a host binary "cython", that's why it is a
host tool. Besides cython there exist a way to use cython in the
setup.py framework of python. Then we need to add to $(CROSS_PYTHON) an
env to "add" a site-package search path to the $(PTXCONF_SYSROOT_HOST).
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/host-cython.make | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rules/host-cython.make b/rules/host-cython.make
index 212b12d..a12dfe4 100644
--- a/rules/host-cython.make
+++ b/rules/host-cython.make
@@ -25,6 +25,8 @@ HOST_CYTHON_SOURCE := $(SRCDIR)/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX)
HOST_CYTHON_DIR := $(HOST_BUILDDIR)/$(HOST_CYTHON)
HOST_CYTHON_LICENSE := APLv2
+CROSS_CYTHON_ENV := PYTHONUSERBASE=$(PTXCONF_SYSROOT_HOST)
+
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ptxdist] [PATCH v2 2/4] python-routing: add new package
2014-03-25 19:53 [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 1/4] host-cython: add CROSS_CYTHON_ENV declaration Alexander Aring
@ 2014-03-25 19:53 ` Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 3/4] python-rplicmp: " Alexander Aring
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-03-25 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/python-routing.in | 13 +++++++++
rules/python-routing.make | 74 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
create mode 100644 rules/python-routing.in
create mode 100644 rules/python-routing.make
diff --git a/rules/python-routing.in b/rules/python-routing.in
new file mode 100644
index 0000000..abfa12c
--- /dev/null
+++ b/rules/python-routing.in
@@ -0,0 +1,13 @@
+## SECTION=python
+
+config PYTHON_ROUTING
+ tristate
+ select HOST_CYTHON
+ select PYTHON
+ select LIBNL3
+ prompt "python-routing"
+ help
+ This is yet another python binding for the libnl3. This bidning
+ was written to encompass the "route" module which isn't encompassed
+ by any other libnl3 python binding. The special route module is
+ necessary for the simpleRPL implementation.
diff --git a/rules/python-routing.make b/rules/python-routing.make
new file mode 100644
index 0000000..323ff86
--- /dev/null
+++ b/rules/python-routing.make
@@ -0,0 +1,74 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON_ROUTING) += python-routing
+
+#
+# Paths and names
+#
+PYTHON_ROUTING_VERSION := 1.0
+PYTHON_ROUTING_MD5 := 2ef6adf2ab6a2f303600999546198a69
+PYTHON_ROUTING := python_routing-$(PYTHON_ROUTING_VERSION)
+PYTHON_ROUTING_SUFFIX := tar.gz
+PYTHON_ROUTING_URL := http://cakelab.org/~eintopf/RPL/$(PYTHON_ROUTING).$(PYTHON_ROUTING_SUFFIX)
+PYTHON_ROUTING_SOURCE := $(SRCDIR)/$(PYTHON_ROUTING).$(PYTHON_ROUTING_SUFFIX)
+PYTHON_ROUTING_DIR := $(BUILDDIR)/$(PYTHON_ROUTING)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_ROUTING_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.compile:
+ @$(call targetinfo)
+ @cd $(PYTHON_ROUTING_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py build_ext
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.install:
+ @$(call targetinfo)
+ @cd $(PYTHON_ROUTING_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py install --root=$(PYTHON_ROUTING_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-routing)
+ @$(call install_fixup, python-routing,PRIORITY,optional)
+ @$(call install_fixup, python-routing,SECTION,base)
+ @$(call install_fixup, python-routing,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, python-routing,DESCRIPTION,missing)
+
+ @$(call install_copy, python-routing, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/Routing.so)
+
+ @$(call install_finish, python-routing)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ptxdist] [PATCH v2 3/4] python-rplicmp: add new package
2014-03-25 19:53 [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 1/4] host-cython: add CROSS_CYTHON_ENV declaration Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 2/4] python-routing: add new package Alexander Aring
@ 2014-03-25 19:53 ` Alexander Aring
2014-03-25 19:53 ` [ptxdist] [PATCH v2 4/4] simplerpl: " Alexander Aring
2014-03-29 9:03 ` [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Michael Olbrich
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-03-25 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/python-rplicmp.in | 11 +++++++
rules/python-rplicmp.make | 75 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+)
create mode 100644 rules/python-rplicmp.in
create mode 100644 rules/python-rplicmp.make
diff --git a/rules/python-rplicmp.in b/rules/python-rplicmp.in
new file mode 100644
index 0000000..75fedc5
--- /dev/null
+++ b/rules/python-rplicmp.in
@@ -0,0 +1,11 @@
+## SECTION=python
+
+config PYTHON_RPLICMP
+ tristate
+ prompt "python-rplicmp"
+ select HOST_CYTHON
+ select PYTHON
+ select LIBCAP
+ help
+ This module allows easy creation of ICMPv6 socket in Python tailored to
+ send RPL messages.
diff --git a/rules/python-rplicmp.make b/rules/python-rplicmp.make
new file mode 100644
index 0000000..a8ef1b2
--- /dev/null
+++ b/rules/python-rplicmp.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON_RPLICMP) += python-rplicmp
+
+#
+# Paths and names
+#
+PYTHON_RPLICMP_VERSION := 1.0
+PYTHON_RPLICMP_MD5 := b2d9a93beb095826fce6e4752fb63491
+PYTHON_RPLICMP := python_rplicmp-$(PYTHON_RPLICMP_VERSION)
+PYTHON_RPLICMP_SUFFIX := tar.gz
+PYTHON_RPLICMP_URL := http://cakelab.org/~eintopf/RPL/$(PYTHON_RPLICMP).$(PYTHON_RPLICMP_SUFFIX)
+PYTHON_RPLICMP_SOURCE := $(SRCDIR)/$(PYTHON_RPLICMP).$(PYTHON_RPLICMP_SUFFIX)
+PYTHON_RPLICMP_DIR := $(BUILDDIR)/$(PYTHON_RPLICMP)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_RPLICMP_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.compile:
+ @$(call targetinfo)
+ @cd $(PYTHON_RPLICMP_DIR) && \
+ $(CROSS_ENV) $(CROSS_CC) -Wall -pedantic -lcap -c -fPIC -o caplib.o caplib.c && \
+ $(CROSS_ENV) $(CROSS_CC) -Wall -pedantic -lcap -c -fPIC -o icmplib.o icmplib.c && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) setup.py build_ext
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.install:
+ @$(call targetinfo)
+ @cd $(PYTHON_RPLICMP_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py install --root=$(PYTHON_RPLICMP_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-rplicmp)
+ @$(call install_fixup, python-rplicmp,PRIORITY,optional)
+ @$(call install_fixup, python-rplicmp,SECTION,base)
+ @$(call install_fixup, python-rplicmp,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, python-rplicmp,DESCRIPTION,missing)
+
+ @$(call install_copy, python-rplicmp, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/RplIcmp.so)
+
+ @$(call install_finish, python-rplicmp)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ptxdist] [PATCH v2 4/4] simplerpl: add new package
2014-03-25 19:53 [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Alexander Aring
` (2 preceding siblings ...)
2014-03-25 19:53 ` [ptxdist] [PATCH v2 3/4] python-rplicmp: " Alexander Aring
@ 2014-03-25 19:53 ` Alexander Aring
2014-03-29 9:03 ` [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Michael Olbrich
4 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2014-03-25 19:53 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/simplerpl.in | 13 +++++++++
rules/simplerpl.make | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 rules/simplerpl.in
create mode 100644 rules/simplerpl.make
diff --git a/rules/simplerpl.in b/rules/simplerpl.in
new file mode 100644
index 0000000..76201f2
--- /dev/null
+++ b/rules/simplerpl.in
@@ -0,0 +1,13 @@
+## SECTION=networking
+
+config SIMPLERPL
+ tristate
+ prompt "simplerpl"
+ select PYTHON_ROUTING
+ select PYTHON_RPLICMP
+ select PYZMQ
+ help
+ SimpleRPL is Linux-based implementation of the Routing Protocol for
+ Low-Power and Lossy Networks (RPL) as defined in RFC 6550. It aims
+ to complete the Linux Wireless Sensor Network ecosystem by bringing
+ a (hopefully) fully-compliant RPL implementation
diff --git a/rules/simplerpl.make b/rules/simplerpl.make
new file mode 100644
index 0000000..a35eee1
--- /dev/null
+++ b/rules/simplerpl.make
@@ -0,0 +1,79 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SIMPLERPL) += simplerpl
+
+#
+# Paths and names
+#
+SIMPLERPL_VERSION := 1.0
+SIMPLERPL_MD5 := 8544a9f7414e98cd2d17ff15332c8eee
+SIMPLERPL := simplerpl-$(SIMPLERPL_VERSION)
+SIMPLERPL_SUFFIX := tar.gz
+SIMPLERPL_URL := http://cakelab.org/~eintopf/RPL/$(SIMPLERPL).$(SIMPLERPL_SUFFIX)
+SIMPLERPL_SOURCE := $(SRCDIR)/$(SIMPLERPL).$(SIMPLERPL_SUFFIX)
+SIMPLERPL_DIR := $(BUILDDIR)/$(SIMPLERPL)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SIMPLERPL_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.compile:
+ @$(call targetinfo)
+ @cd $(SIMPLERPL_DIR) && \
+ $(CROSS_ENV) $(CROSS_PYTHON) setup.py build -e "/usr/bin/env python"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.install:
+ @$(call targetinfo)
+ @cd $(SIMPLERPL_DIR) && \
+ $(CROSS_PYTHON) \
+ setup.py install --root=$(SIMPLERPL_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, simplerpl)
+ @$(call install_fixup, simplerpl,PRIORITY,optional)
+ @$(call install_fixup, simplerpl,SECTION,base)
+ @$(call install_fixup, simplerpl,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, simplerpl,DESCRIPTION,missing)
+
+ @for file in $(shell cd $(SIMPLERPL_PKGDIR) && find . -name "*.pyc"); \
+ do \
+ $(call install_copy, simplerpl, 0, 0, 0644, -, /$$file); \
+ done
+
+ @$(call install_copy, simplerpl, 0, 0, 0755, -, /usr/bin/cliRPL.py)
+ @$(call install_copy, simplerpl, 0, 0, 0755, -, /usr/bin/simpleRPL.py)
+
+ @$(call install_finish, simplerpl)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes
2014-03-25 19:53 [ptxdist] [PATCH v2 0/4] python: add simpleRPL package, dependencies and cakes Alexander Aring
` (3 preceding siblings ...)
2014-03-25 19:53 ` [ptxdist] [PATCH v2 4/4] simplerpl: " Alexander Aring
@ 2014-03-29 9:03 ` Michael Olbrich
4 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-03-29 9:03 UTC (permalink / raw)
To: ptxdist
On Tue, Mar 25, 2014 at 08:53:46PM +0100, Alexander Aring wrote:
> Hi,
>
> this patch series adds the simpleRPL python implementation into ptxdist.
> This implementation is in a early state of development. I talked with the
> original Author "Tony Cheneau", he doesn't have time anymore to work on
> this implementation. Now, I have some time and will look at this code
> and maybe I do some implementation to that.
>
> There are two questions for me:
>
> i)
>
> The license is a NIST license which describes [1]:
>
> "... As a result, a formal license is not needed to use this software."
>
> I don't add any LICENSE to the rule files, but which is the correct ptxdist
> synonym for a NIST license, but the NIST license says the software has no
> license. I think there is no NIST license and the NIST developers doens't
> release the software under any license.
>
> ii)
>
> I uploaded the software to my cakelab account. I hope that's okay, the
> alternative would be github. But github has a confusing naming style
> at generate releases for software and I can't change them.
>
> I have still access to the cakelab "bakery for gourmets" server and
> I will take care of this that the RPL cakes (the software archives) is still
> there for ptxdist. I know the owner of the cake laboratories.
>
>
>
> There are still some change needed to the buildsystem to work better with
> ptxdist. I will try to do that and will send patches for these rules then.
> For example ("[PATCH 3/4] python-rplicmp: add new package") will call
> $(CROSS_CC) directly.
>
> - Alex
>
> [1] https://github.com/tcheneau/simpleRPL/blob/master/LICENSE.txt
>
> changes since v2:
> - change lib permission in python-rplicmp to 644
> - change lib permission in python-routing to 644
> - add python tag to cover-letter
>
> Alexander Aring (4):
> host-cython: add CROSS_CYTHON_ENV declaration
I've done this a bit differently. I've modified the other patches
accordingly before applying them.
Thanks,
Michael
> python-routing: add new package
> python-rplicmp: add new package
> simplerpl: add new package
>
> rules/host-cython.make | 2 ++
> rules/python-routing.in | 13 ++++++++
> rules/python-routing.make | 74 ++++++++++++++++++++++++++++++++++++++++++++
> rules/python-rplicmp.in | 11 +++++++
> rules/python-rplicmp.make | 75 ++++++++++++++++++++++++++++++++++++++++++++
> rules/simplerpl.in | 13 ++++++++
> rules/simplerpl.make | 79 +++++++++++++++++++++++++++++++++++++++++++++++
> 7 files changed, 267 insertions(+)
> create mode 100644 rules/python-routing.in
> create mode 100644 rules/python-routing.make
> create mode 100644 rules/python-rplicmp.in
> create mode 100644 rules/python-rplicmp.make
> create mode 100644 rules/simplerpl.in
> create mode 100644 rules/simplerpl.make
>
> --
> 1.9.1
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread