mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCHv4] Fix Python usage for lowpan-tools
@ 2014-01-10  8:26 Juergen Beisert
  2014-01-10  8:26 ` [ptxdist] [PATCH 1/2] lowpan-tools: ensure proper Python handling Juergen Beisert
  2014-01-10  8:26 ` [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use Juergen Beisert
  0 siblings, 2 replies; 4+ messages in thread
From: Juergen Beisert @ 2014-01-10  8:26 UTC (permalink / raw)
  To: ptxdist

After some internal discussions here the fourth approach to clean up
the Python dependency of the lowpan-tools package

jbe


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 1/2] lowpan-tools: ensure proper Python handling
  2014-01-10  8:26 [ptxdist] [PATCHv4] Fix Python usage for lowpan-tools Juergen Beisert
@ 2014-01-10  8:26 ` Juergen Beisert
  2014-01-10  8:26 ` [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use Juergen Beisert
  1 sibling, 0 replies; 4+ messages in thread
From: Juergen Beisert @ 2014-01-10  8:26 UTC (permalink / raw)
  To: ptxdist

A dependency (build and run time) to Python only exists if the serial test
program gets installed. If all tests programs are disabled, we can omit
Python at all.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 ...hon-is-required-only-for-the-serial-tests.patch | 63 ++++++++++++++++++++++
 patches/lowpan-tools-0.3/series                    |  4 ++
 rules/lowpan-tools.make                            |  1 +
 3 files changed, 68 insertions(+)
 create mode 100644 patches/lowpan-tools-0.3/0008-Python-is-required-only-for-the-serial-tests.patch

diff --git a/patches/lowpan-tools-0.3/0008-Python-is-required-only-for-the-serial-tests.patch b/patches/lowpan-tools-0.3/0008-Python-is-required-only-for-the-serial-tests.patch
new file mode 100644
index 0000000..93121df
--- /dev/null
+++ b/patches/lowpan-tools-0.3/0008-Python-is-required-only-for-the-serial-tests.patch
@@ -0,0 +1,63 @@
+From: Juergen Beisert <jbe@pengutronix.de>
+Date: Tue, 7 Jan 2014 10:25:05 +0100
+Subject: [PATCH] Python is required only for the serial tests
+
+Only the serial tests require host and target python.
+
+Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
+---
+ configure.ac            |   20 +++++++++++++++-----
+ test-serial/Makefile.am |    2 ++
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 89c2651..755b39a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,6 +19,11 @@ AC_CONFIG_HEADER([config.h])
+ # Test for new silent rules and enable only if they are available
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
++AC_ARG_ENABLE([tests],
++	[AC_HELP_STRING([--disable-tests], [do not install the tests @<:@default=yes@:>@])],
++	[],
++	[enable_tests=yes])
++
+ AC_ARG_WITH(zbtestdir, [AC_HELP_STRING([--with-zbtestdir],
+ 	    [directory where all test programs will be installed])],
+ 	    [zbtestdir=$withval],
+@@ -77,11 +82,16 @@ AC_PROG_LIBTOOL
+ AM_PROG_LEX
+ AC_PROG_YACC
+ AC_SUBST(LIBTOOL_DEPS)
+-# Currently the scripts works with python2.x only
+-# Check for this at first
+-AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
+-AM_PATH_PYTHON(,, [:])
+-py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2])
++
++if test "x$enable_tests" == "xyes" ; then
++	# Currently the scripts works with python2.x only
++	# Check for this at first
++	AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
++	AM_PATH_PYTHON(,, [:])
++	py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2])
++fi
++AM_CONDITIONAL([PYTHON_AVAILABLE], [test "x$enable_tests" == "xyes"])
++
+ AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+ 
+ # Checks for libraries.
+diff --git a/test-serial/Makefile.am b/test-serial/Makefile.am
+index 5553ded..733d472 100644
+--- a/test-serial/Makefile.am
++++ b/test-serial/Makefile.am
+@@ -1,6 +1,8 @@
++if PYTHON_AVAILABLE
+ include $(top_srcdir)/Makefile.common
+ 
+ python_PYTHON = test_DQ.py
+ tests = test_packets.py test_edscan.py test_recv.py test_trx.py
+ zbtest_SCRIPTS = $(tests)
+ EXTRA_DIST = $(tests)
++endif
diff --git a/patches/lowpan-tools-0.3/series b/patches/lowpan-tools-0.3/series
index 1652508..4139c7a 100644
--- a/patches/lowpan-tools-0.3/series
+++ b/patches/lowpan-tools-0.3/series
@@ -1,3 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
 0001-izoordinator-Fixes-to-error-handling.patch
 0002-addrdb-fix-include-dependency-and-remove-redefined.patch
 0003-configure.ac-check-for-python2.x.patch
@@ -5,3 +7,5 @@
 0005-configure.ac-Check-that-the-python-version-is-indeed.patch
 0006-Allow-to-set-PAN-ID-short-address-and-channel-manual.patch
 0007-iz-mac-Handle-return-code-from-set-command.patch
+0008-Python-is-required-only-for-the-serial-tests.patch
+# 7c25727779db5bbadf89312809d9fd8c  - git-ptx-patches magic
diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
index a4919bd..5bed2a4 100644
--- a/rules/lowpan-tools.make
+++ b/rules/lowpan-tools.make
@@ -44,6 +44,7 @@ endif
 LOWPAN_TOOLS_CONF_TOOL	:= autoconf
 LOWPAN_TOOLS_CONF_OPT	:= \
 	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis, PTXCONF_LOWPAN_TOOLS_TESTS)-tests \
 	--disable-manpages \
 	--enable-shared \
 	--disable-static \
-- 
1.8.5.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use
  2014-01-10  8:26 [ptxdist] [PATCHv4] Fix Python usage for lowpan-tools Juergen Beisert
  2014-01-10  8:26 ` [ptxdist] [PATCH 1/2] lowpan-tools: ensure proper Python handling Juergen Beisert
@ 2014-01-10  8:26 ` Juergen Beisert
  2014-01-10 15:45   ` Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2014-01-10  8:26 UTC (permalink / raw)
  To: ptxdist

Whenever the gcc version is upgraded using the -Werror parameter is a
source of pain (at least for automated buildsystems).

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 rules/lowpan-tools.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
index 5bed2a4..3812188 100644
--- a/rules/lowpan-tools.make
+++ b/rules/lowpan-tools.make
@@ -48,6 +48,7 @@ LOWPAN_TOOLS_CONF_OPT	:= \
 	--disable-manpages \
 	--enable-shared \
 	--disable-static \
+	--disable-werror \
 	--with-gnu-ld
 
 LOWPAN_TOOLS_INSTALL_FILES := \
-- 
1.8.5.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use
  2014-01-10  8:26 ` [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use Juergen Beisert
@ 2014-01-10 15:45   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2014-01-10 15:45 UTC (permalink / raw)
  To: ptxdist

On Fri, Jan 10, 2014 at 09:26:10AM +0100, Juergen Beisert wrote:
> Whenever the gcc version is upgraded using the -Werror parameter is a
> source of pain (at least for automated buildsystems).
> 
> Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

Both applied

Thanks,
Michael

> ---
>  rules/lowpan-tools.make | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/rules/lowpan-tools.make b/rules/lowpan-tools.make
> index 5bed2a4..3812188 100644
> --- a/rules/lowpan-tools.make
> +++ b/rules/lowpan-tools.make
> @@ -48,6 +48,7 @@ LOWPAN_TOOLS_CONF_OPT	:= \
>  	--disable-manpages \
>  	--enable-shared \
>  	--disable-static \
> +	--disable-werror \
>  	--with-gnu-ld
>  
>  LOWPAN_TOOLS_INSTALL_FILES := \
> -- 
> 1.8.5.2
> 
> 
> -- 
> 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] 4+ messages in thread

end of thread, other threads:[~2014-01-10 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10  8:26 [ptxdist] [PATCHv4] Fix Python usage for lowpan-tools Juergen Beisert
2014-01-10  8:26 ` [ptxdist] [PATCH 1/2] lowpan-tools: ensure proper Python handling Juergen Beisert
2014-01-10  8:26 ` [ptxdist] [PATCH 2/2] lowpan-tools: avoid the -Werror use Juergen Beisert
2014-01-10 15:45   ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox