Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed
@ 2014-04-28 19:00 Peter Seiderer
  2014-04-28 19:00 ` [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option Peter Seiderer
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 19:00 UTC (permalink / raw)
  To: buildroot

[Patch 1/4] is a replacement for evemu-0002-disable-tests-patch, because
I think it is nicer to add the evemu disable feature the same way
as with the python binding (see [Patch 3/4]) and maybe this version
is suitable for upstream...

[Patch 2/4] fixes host-python/host-python3 dependency

[Patch 3/4] enables python binding only for python2

[Patch 4/4] enables python binding for python3 (with two python3
related fixes), but something seems to be broken with the
evemu-1.2.0/config-aux/py-compile script, I get no compile error and
no compiled python binding files on the target.

Patch evemu-0008-python-fix-device-open-for-python3.patch fixed an python3
binding runtime failure from an earlier build (still with
EVEMU_DEPENDENCIES += host-python), which leaves non compiled python
source files in the site-packages/evemu directory...

Peter Seiderer (4):
  evemu: disable tests via evemu configure option
  evemu: fix host-python/host-python3 dependency
  evemu: build python2 binding only if target python2 is enabled
  evemu: enable python3 bindings

 ...-00008-python-fix-device-open-for-python3.patch | 35 ++++++++++++++++
 package/evemu/evemu-0002-disable-tests.patch       | 19 ---------
 ...005-configure.ac-add-disable-tests-option.patch | 44 +++++++++++++++++++++
 ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
 ...-fixes-the-syntax-for-raising-exceptions-.patch | 39 ++++++++++++++++++
 package/evemu/evemu.mk                             | 14 ++++++-
 6 files changed, 176 insertions(+), 21 deletions(-)
 create mode 100644 package/evemu/evemu-00008-python-fix-device-open-for-python3.patch
 delete mode 100644 package/evemu/evemu-0002-disable-tests.patch
 create mode 100644 package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch
 create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
 create mode 100644 package/evemu/evemu-0007-Description-fixes-the-syntax-for-raising-exceptions-.patch

-- 
1.8.1.4

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

* [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option
  2014-04-28 19:00 [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed Peter Seiderer
@ 2014-04-28 19:00 ` Peter Seiderer
  2014-04-28 19:27   ` Arnout Vandecappelle
  2014-04-28 19:00 ` [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency Peter Seiderer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 19:00 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/evemu/evemu-0002-disable-tests.patch       | 19 ----------
 ...005-configure.ac-add-disable-tests-option.patch | 44 ++++++++++++++++++++++
 package/evemu/evemu.mk                             |  3 ++
 3 files changed, 47 insertions(+), 19 deletions(-)
 delete mode 100644 package/evemu/evemu-0002-disable-tests.patch
 create mode 100644 package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch

diff --git a/package/evemu/evemu-0002-disable-tests.patch b/package/evemu/evemu-0002-disable-tests.patch
deleted file mode 100644
index e545c91..0000000
--- a/package/evemu/evemu-0002-disable-tests.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-[PATCH] disable tests
-
-The tests need C++ support and add to build time, so disable them for BR.
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- Makefile.am |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: evemu-1.2.0/Makefile.am
-===================================================================
---- evemu-1.2.0.orig/Makefile.am
-+++ evemu-1.2.0/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = src tools python test
-+SUBDIRS = src tools python
- 
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = evemu.pc
diff --git a/package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch b/package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch
new file mode 100644
index 0000000..d1f9957
--- /dev/null
+++ b/package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch
@@ -0,0 +1,44 @@
+From 077722193e4e59e76591abbaddac9d22068be4e6 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 27 Apr 2014 13:14:51 +0200
+Subject: [PATCH 5/8] configure.ac: add '--disable-tests' option
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ Makefile.am  | 2 +-
+ configure.ac | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 7b68f3d..a83b35f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = src tools python test
++SUBDIRS = src tools python $(SUBDIR_TESTS)
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = evemu.pc
+diff --git a/configure.ac b/configure.ac
+index ec21a6e..4e0c3b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,6 +43,15 @@ if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
+ 	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
+ fi
+ 
++AC_ARG_ENABLE([tests],
++	AS_HELP_STRING([--disable-tests], [Disable running tests]))
++
++AS_IF([test "x$enable_tests" != "xno"], [
++	SUBDIR_TESTS=test
++])
++
++AC_SUBST([SUBDIR_TESTS])
++
+ AC_SUBST(AM_CFLAGS,
+          "-Wall -Wextra -pedantic")
+ 
+-- 
+1.8.1.4
+
diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
index 0f25f62..385a982 100644
--- a/package/evemu/evemu.mk
+++ b/package/evemu/evemu.mk
@@ -18,6 +18,9 @@ EVEMU_CONF_ENV = ac_cv_path_ASCIIDOC=""
 # of host system version)
 EVEMU_MAKE_ENV = SYSROOT=$(STAGING_DIR)
 
+# disable tests generation because of C++ dependency
+EVEMU_CONF_OPT += --disable-tests
+
 # Uses PKG_CHECK_MODULES() in configure.ac
 EVEMU_DEPENDENCIES = host-pkgconf libevdev
 
-- 
1.8.1.4

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

* [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency
  2014-04-28 19:00 [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed Peter Seiderer
  2014-04-28 19:00 ` [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option Peter Seiderer
@ 2014-04-28 19:00 ` Peter Seiderer
  2014-04-28 19:28   ` Arnout Vandecappelle
  2014-04-28 19:00 ` [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled Peter Seiderer
  2014-04-28 19:00 ` [Buildroot] [PATCH 4/4] evemu: enable python3 bindings Peter Seiderer
  3 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 19:00 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/evemu/evemu.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
index 385a982..07ad6f6 100644
--- a/package/evemu/evemu.mk
+++ b/package/evemu/evemu.mk
@@ -24,8 +24,8 @@ EVEMU_CONF_OPT += --disable-tests
 # Uses PKG_CHECK_MODULES() in configure.ac
 EVEMU_DEPENDENCIES = host-pkgconf libevdev
 
-# Needs Python to generate a wrapper
-EVEMU_DEPENDENCIES += host-python
+# Needs Python for header file generation
+EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
 
 # package source code coming from git, so it doesn't have generated
 # configure and Makefile.in
-- 
1.8.1.4

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

* [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
  2014-04-28 19:00 [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed Peter Seiderer
  2014-04-28 19:00 ` [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option Peter Seiderer
  2014-04-28 19:00 ` [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency Peter Seiderer
@ 2014-04-28 19:00 ` Peter Seiderer
  2014-04-28 19:48   ` Arnout Vandecappelle
  2014-04-28 19:00 ` [Buildroot] [PATCH 4/4] evemu: enable python3 bindings Peter Seiderer
  3 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 19:00 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
 package/evemu/evemu.mk                             |  8 ++++
 2 files changed, 54 insertions(+)
 create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch

diff --git a/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
new file mode 100644
index 0000000..f100b2e
--- /dev/null
+++ b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
@@ -0,0 +1,46 @@
+From 44f42cfa6b58a256d3b89bce1043b0efed7eeaeb Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 27 Apr 2014 13:23:41 +0200
+Subject: [PATCH 6/8] configure.ac: add '--disable-python-binding' option
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ Makefile.am  |  2 +-
+ configure.ac | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a83b35f..446ec4c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = src tools python $(SUBDIR_TESTS)
++SUBDIRS = src tools $(SUBDIR_PYTHON_BINDING) $(SUBDIR_TESTS)
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = evemu.pc
+diff --git a/configure.ac b/configure.ac
+index 4e0c3b8..bb49bbc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,17 @@ AS_IF([test "x$enable_tests" != "xno"], [
+ 
+ AC_SUBST([SUBDIR_TESTS])
+ 
++AC_ARG_ENABLE([python-binding],
++	AS_HELP_STRING([--disable-python-binding],
++		 [Disable generation of python binding]))
++
++AS_IF([test "x$enable_python_binding" != "xno"], [
++	SUBDIR_PYTHON_BINDING=python
++])
++
++AC_SUBST([SUBDIR_PYTHON_BINDING])
++
++
+ AC_SUBST(AM_CFLAGS,
+          "-Wall -Wextra -pedantic")
+ 
+-- 
+1.8.1.4
+
diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
index 07ad6f6..44b8b89 100644
--- a/package/evemu/evemu.mk
+++ b/package/evemu/evemu.mk
@@ -27,6 +27,14 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
 # Needs Python for header file generation
 EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
 
+# Check for target python (python3 binding disabled because
+# of build/byte-compile problems)
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+	EVEMU_DEPENDENCIES += python
+else
+	EVEMU_CONF_OPT += --disable-python-binding
+endif
+
 # package source code coming from git, so it doesn't have generated
 # configure and Makefile.in
 EVEMU_AUTORECONF = YES
-- 
1.8.1.4

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

* [Buildroot] [PATCH 4/4] evemu: enable python3 bindings
  2014-04-28 19:00 [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed Peter Seiderer
                   ` (2 preceding siblings ...)
  2014-04-28 19:00 ` [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled Peter Seiderer
@ 2014-04-28 19:00 ` Peter Seiderer
  3 siblings, 0 replies; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 19:00 UTC (permalink / raw)
  To: buildroot

Add evemu/python3 related patches:
- fix python/evemu/base.py for python3 (add patch from [1])
- fix python3 binding runtime failure

[1] http://ftp.de.debian.org/debian/pool/main/e/evemu/evemu_1.2.0-2.debian.tar.xz

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 ...-fixes-the-syntax-for-raising-exceptions-.patch | 39 ++++++++++++++++++++++
 ...u-0008-python-fix-device-open-for-python3.patch | 35 +++++++++++++++++++
 package/evemu/evemu.mk                             |  7 ++--
 3 files changed, 77 insertions(+), 4 deletions(-)
 create mode 100644 package/evemu/evemu-0007-Description-fixes-the-syntax-for-raising-exceptions-.patch
 create mode 100644 package/evemu/evemu-0008-python-fix-device-open-for-python3.patch

diff --git a/package/evemu/evemu-0007-Description-fixes-the-syntax-for-raising-exceptions-.patch b/package/evemu/evemu-0007-Description-fixes-the-syntax-for-raising-exceptions-.patch
new file mode 100644
index 0000000..ea9dfaf
--- /dev/null
+++ b/package/evemu/evemu-0007-Description-fixes-the-syntax-for-raising-exceptions-.patch
@@ -0,0 +1,39 @@
+From 1730ff58181b872a752b9f5428061b59874f063c Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 27 Apr 2014 00:18:40 +0200
+Subject: [PATCH 7/8] Description: fixes the syntax for raising exceptions to
+ be Python2 and Python3 acceptable.
+
+Author: Stephen M. Webb
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706155
+---
+ python/evemu/base.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/python/evemu/base.py b/python/evemu/base.py
+index 84e0306..f972182 100644
+--- a/python/evemu/base.py
++++ b/python/evemu/base.py
+@@ -19,15 +19,15 @@ class EvEmuBase(object):
+     def _call0(self, api_call, *parameters):
+         result = api_call(*parameters)
+         if result == 0 and self.get_c_errno() != 0:
+-            raise exception.ExecutionError, "%s: %s" % (
+-                api_call.__name__, self.get_c_error())
++            raise exception.ExecutionError("%s: %s" % (
++                api_call.__name__, self.get_c_error()))
+         return result
+ 
+     def _call(self, api_call, *parameters):
+         result = api_call(*parameters)
+         if result < 0 and self.get_c_errno() != 0:
+-            raise exception.ExecutionError, "%s: %s" % (
+-                api_call.__name__, self.get_c_error())
++            raise exception.ExecutionError("%s: %s" % (
++                api_call.__name__, self.get_c_error()))
+         return result
+ 
+     def get_c_errno(self):
+-- 
+1.8.1.4
+
diff --git a/package/evemu/evemu-0008-python-fix-device-open-for-python3.patch b/package/evemu/evemu-0008-python-fix-device-open-for-python3.patch
new file mode 100644
index 0000000..da5a73c
--- /dev/null
+++ b/package/evemu/evemu-0008-python-fix-device-open-for-python3.patch
@@ -0,0 +1,35 @@
+From 1ff2dc1f7603588e73090d27437c56dbd4b7e8e1 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 27 Apr 2014 01:16:16 +0200
+Subject: [PATCH 8/8] python: fix device open for python3
+
+- use 'rb' instead of 'r+b', fixes:
+
+>>> import evemu
+>>> evemu.Device('/dev/input/event0')
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/usr/lib/python3.4/site-packages/evemu/__init__.py", line 50, in __init__
+io.UnsupportedOperation: File or stream is not seekable.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ python/evemu/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/evemu/__init__.py b/python/evemu/__init__.py
+index abdbf7e..aa73871 100644
+--- a/python/evemu/__init__.py
++++ b/python/evemu/__init__.py
+@@ -47,7 +47,7 @@ class Device(object):
+         """
+ 
+         if type(f).__name__ == 'str':
+-            self._file = open(f, 'r+b')
++            self._file = open(f, 'rb')
+         elif type(f).__name__ == 'file':
+             self._file = f
+         else:
+-- 
+1.8.1.4
+
diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
index 44b8b89..0cf4c76 100644
--- a/package/evemu/evemu.mk
+++ b/package/evemu/evemu.mk
@@ -27,10 +27,9 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
 # Needs Python for header file generation
 EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
 
-# Check for target python (python3 binding disabled because
-# of build/byte-compile problems)
-ifeq ($(BR2_PACKAGE_PYTHON),y)
-	EVEMU_DEPENDENCIES += python
+# Check for target python
+ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
+	EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),python3,python)
 else
 	EVEMU_CONF_OPT += --disable-python-binding
 endif
-- 
1.8.1.4

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

* [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option
  2014-04-28 19:00 ` [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option Peter Seiderer
@ 2014-04-28 19:27   ` Arnout Vandecappelle
  2014-04-28 20:48     ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2014-04-28 19:27 UTC (permalink / raw)
  To: buildroot

On 28/04/14 21:00, Peter Seiderer wrote:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 It would have been nice to have used evemu-0002-... instead of
evemu-0005-.... It would also have been nice to avoid the [5/8] in the
patch subject. But neither remark is critical.

 Regards,
 Arnout

> ---
>  package/evemu/evemu-0002-disable-tests.patch       | 19 ----------
>  ...005-configure.ac-add-disable-tests-option.patch | 44 ++++++++++++++++++++++
>  package/evemu/evemu.mk                             |  3 ++
>  3 files changed, 47 insertions(+), 19 deletions(-)
>  delete mode 100644 package/evemu/evemu-0002-disable-tests.patch
>  create mode 100644 package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch
[snip]

-- 
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

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

* [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency
  2014-04-28 19:00 ` [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency Peter Seiderer
@ 2014-04-28 19:28   ` Arnout Vandecappelle
  0 siblings, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2014-04-28 19:28 UTC (permalink / raw)
  To: buildroot

On 28/04/14 21:00, Peter Seiderer wrote:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Regards,
 Arnout

> ---
>  package/evemu/evemu.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
> index 385a982..07ad6f6 100644
> --- a/package/evemu/evemu.mk
> +++ b/package/evemu/evemu.mk
> @@ -24,8 +24,8 @@ EVEMU_CONF_OPT += --disable-tests
>  # Uses PKG_CHECK_MODULES() in configure.ac
>  EVEMU_DEPENDENCIES = host-pkgconf libevdev
>  
> -# Needs Python to generate a wrapper
> -EVEMU_DEPENDENCIES += host-python
> +# Needs Python for header file generation
> +EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
>  
>  # package source code coming from git, so it doesn't have generated
>  # configure and Makefile.in
> 


-- 
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

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

* [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
  2014-04-28 19:00 ` [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled Peter Seiderer
@ 2014-04-28 19:48   ` Arnout Vandecappelle
  2014-04-28 20:53     ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2014-04-28 19:48 UTC (permalink / raw)
  To: buildroot

On 28/04/14 21:00, Peter Seiderer wrote:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
>  package/evemu/evemu.mk                             |  8 ++++
>  2 files changed, 54 insertions(+)
>  create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> 
> diff --git a/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> new file mode 100644
> index 0000000..f100b2e
> --- /dev/null
> +++ b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> @@ -0,0 +1,46 @@
> +From 44f42cfa6b58a256d3b89bce1043b0efed7eeaeb Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report@gmx.net>
> +Date: Sun, 27 Apr 2014 13:23:41 +0200
> +Subject: [PATCH 6/8] configure.ac: add '--disable-python-binding' option

 Same remark about avoiding 6/8 (the reasoning is: if later on patches 7
and 8 disappear and patch 9 is added, it looks strange to have the /8 there).

> +
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + Makefile.am  |  2 +-
> + configure.ac | 11 +++++++++++
> + 2 files changed, 12 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index a83b35f..446ec4c 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -1,4 +1,4 @@
> +-SUBDIRS = src tools python $(SUBDIR_TESTS)
> ++SUBDIRS = src tools $(SUBDIR_PYTHON_BINDING) $(SUBDIR_TESTS)
> + 
> + pkgconfigdir = $(libdir)/pkgconfig
> + pkgconfig_DATA = evemu.pc
> +diff --git a/configure.ac b/configure.ac
> +index 4e0c3b8..bb49bbc 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -52,6 +52,17 @@ AS_IF([test "x$enable_tests" != "xno"], [
> + 
> + AC_SUBST([SUBDIR_TESTS])
> + 
> ++AC_ARG_ENABLE([python-binding],
> ++	AS_HELP_STRING([--disable-python-binding],
> ++		 [Disable generation of python binding]))

 bindings is typically used in plural. And actually, most packages will
call it --enable-python or --with-python.


> ++
> ++AS_IF([test "x$enable_python_binding" != "xno"], [
> ++	SUBDIR_PYTHON_BINDING=python
> ++])
> ++
> ++AC_SUBST([SUBDIR_PYTHON_BINDING])
> ++
> ++
> + AC_SUBST(AM_CFLAGS,
> +          "-Wall -Wextra -pedantic")
> + 
> +-- 
> +1.8.1.4
> +
> diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
> index 07ad6f6..44b8b89 100644
> --- a/package/evemu/evemu.mk
> +++ b/package/evemu/evemu.mk
> @@ -27,6 +27,14 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
>  # Needs Python for header file generation
>  EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
>  
> +# Check for target python (python3 binding disabled because
> +# of build/byte-compile problems)
> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> +	EVEMU_DEPENDENCIES += python

 We normally put an explicit --enable-python-binding(s) here.

 Also, we don't normally indent inside conditions in .mk files
(indentation is reserved for commands and for continuation lines of
assignments).

 Regards,
 Arnout

> +else
> +	EVEMU_CONF_OPT += --disable-python-binding
> +endif
> +
>  # package source code coming from git, so it doesn't have generated
>  # configure and Makefile.in
>  EVEMU_AUTORECONF = YES
> 


-- 
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

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

* [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option
  2014-04-28 19:27   ` Arnout Vandecappelle
@ 2014-04-28 20:48     ` Peter Seiderer
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 20:48 UTC (permalink / raw)
  To: buildroot

Hello Arnout,

> Gesendet: Montag, 28. April 2014 um 21:27 Uhr
> Von: "Arnout Vandecappelle" <arnout@mind.be>
> An: "Peter Seiderer" <ps.report@gmx.net>, buildroot at busybox.net
> Cc: "Peter Korsgaard" <jacmet@uclibc.org>
> Betreff: Re: [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option
>
> On 28/04/14 21:00, Peter Seiderer wrote:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
>  It would have been nice to have used evemu-0002-... instead of
> evemu-0005-.... It would also have been nice to avoid the [5/8] in the
> patch subject. But neither remark is critical.
> 

O.k. will fix both in next patch version...

Regards,
Peter

>  Regards,
>  Arnout
> 
> > ---
> >  package/evemu/evemu-0002-disable-tests.patch       | 19 ----------
> >  ...005-configure.ac-add-disable-tests-option.patch | 44 ++++++++++++++++++++++
> >  package/evemu/evemu.mk                             |  3 ++
> >  3 files changed, 47 insertions(+), 19 deletions(-)
> >  delete mode 100644 package/evemu/evemu-0002-disable-tests.patch
> >  create mode 100644 package/evemu/evemu-0005-configure.ac-add-disable-tests-option.patch
> [snip]
> 
> -- 
> 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
> 

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

* [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
  2014-04-28 19:48   ` Arnout Vandecappelle
@ 2014-04-28 20:53     ` Peter Seiderer
  2014-04-28 21:01       ` Arnout Vandecappelle
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 20:53 UTC (permalink / raw)
  To: buildroot

Hello Arnout,

> Gesendet: Montag, 28. April 2014 um 21:48 Uhr
> Von: "Arnout Vandecappelle" <arnout@mind.be>
> An: "Peter Seiderer" <ps.report@gmx.net>, buildroot at busybox.net
> Cc: "Peter Korsgaard" <jacmet@uclibc.org>
> Betreff: Re: [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
>
> On 28/04/14 21:00, Peter Seiderer wrote:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> >  ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
> >  package/evemu/evemu.mk                             |  8 ++++
> >  2 files changed, 54 insertions(+)
> >  create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> > 
> > diff --git a/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> > new file mode 100644
> > index 0000000..f100b2e
> > --- /dev/null
> > +++ b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> > @@ -0,0 +1,46 @@
> > +From 44f42cfa6b58a256d3b89bce1043b0efed7eeaeb Mon Sep 17 00:00:00 2001
> > +From: Peter Seiderer <ps.report@gmx.net>
> > +Date: Sun, 27 Apr 2014 13:23:41 +0200
> > +Subject: [PATCH 6/8] configure.ac: add '--disable-python-binding' option
> 
>  Same remark about avoiding 6/8 (the reasoning is: if later on patches 7
> and 8 disappear and patch 9 is added, it looks strange to have the /8 there).
> 

O.k, will fix...

> > +
> > +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > +---
> > + Makefile.am  |  2 +-
> > + configure.ac | 11 +++++++++++
> > + 2 files changed, 12 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/Makefile.am b/Makefile.am
> > +index a83b35f..446ec4c 100644
> > +--- a/Makefile.am
> > ++++ b/Makefile.am
> > +@@ -1,4 +1,4 @@
> > +-SUBDIRS = src tools python $(SUBDIR_TESTS)
> > ++SUBDIRS = src tools $(SUBDIR_PYTHON_BINDING) $(SUBDIR_TESTS)
> > + 
> > + pkgconfigdir = $(libdir)/pkgconfig
> > + pkgconfig_DATA = evemu.pc
> > +diff --git a/configure.ac b/configure.ac
> > +index 4e0c3b8..bb49bbc 100644
> > +--- a/configure.ac
> > ++++ b/configure.ac
> > +@@ -52,6 +52,17 @@ AS_IF([test "x$enable_tests" != "xno"], [
> > + 
> > + AC_SUBST([SUBDIR_TESTS])
> > + 
> > ++AC_ARG_ENABLE([python-binding],
> > ++	AS_HELP_STRING([--disable-python-binding],
> > ++		 [Disable generation of python binding]))
> 
>  bindings is typically used in plural. And actually, most packages will
> call it --enable-python or --with-python.
> 

O.k, will fix the s/binding/bindings/. Used '--disable-python-binding' because of
the analogy to '--disable-tests' and I did not want to change the default behaviour
of the original evemu source package...

> 
> > ++
> > ++AS_IF([test "x$enable_python_binding" != "xno"], [
> > ++	SUBDIR_PYTHON_BINDING=python
> > ++])
> > ++
> > ++AC_SUBST([SUBDIR_PYTHON_BINDING])
> > ++
> > ++
> > + AC_SUBST(AM_CFLAGS,
> > +          "-Wall -Wextra -pedantic")
> > + 
> > +-- 
> > +1.8.1.4
> > +
> > diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
> > index 07ad6f6..44b8b89 100644
> > --- a/package/evemu/evemu.mk
> > +++ b/package/evemu/evemu.mk
> > @@ -27,6 +27,14 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
> >  # Needs Python for header file generation
> >  EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
> >  
> > +# Check for target python (python3 binding disabled because
> > +# of build/byte-compile problems)
> > +ifeq ($(BR2_PACKAGE_PYTHON),y)
> > +	EVEMU_DEPENDENCIES += python
> 
>  We normally put an explicit --enable-python-binding(s) here.

... see above, enabled is the default....

> 
>  Also, we don't normally indent inside conditions in .mk files
> (indentation is reserved for commands and for continuation lines of
> assignments).

O.k, will fix...

Regards,
Peter

> 
>  Regards,
>  Arnout
> 
> > +else
> > +	EVEMU_CONF_OPT += --disable-python-binding
> > +endif
> > +
> >  # package source code coming from git, so it doesn't have generated
> >  # configure and Makefile.in
> >  EVEMU_AUTORECONF = YES
> > 
> 
> 
> -- 
> 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
> 

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

* [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
  2014-04-28 20:53     ` Peter Seiderer
@ 2014-04-28 21:01       ` Arnout Vandecappelle
  2014-04-28 22:08         ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2014-04-28 21:01 UTC (permalink / raw)
  To: buildroot

On 28/04/14 22:53, Peter Seiderer wrote:
> Hello Arnout,
> 
>> Gesendet: Montag, 28. April 2014 um 21:48 Uhr
>> Von: "Arnout Vandecappelle" <arnout@mind.be>
>> An: "Peter Seiderer" <ps.report@gmx.net>, buildroot at busybox.net
>> Cc: "Peter Korsgaard" <jacmet@uclibc.org>
>> Betreff: Re: [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
>>
>> On 28/04/14 21:00, Peter Seiderer wrote:
>>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>>> ---
>>>  ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
>>>  package/evemu/evemu.mk                             |  8 ++++
>>>  2 files changed, 54 insertions(+)
>>>  create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
>>>
>>> diff --git a/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
>>> new file mode 100644
>>> index 0000000..f100b2e
>>> --- /dev/null
>>> +++ b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
>>> @@ -0,0 +1,46 @@
>>> +From 44f42cfa6b58a256d3b89bce1043b0efed7eeaeb Mon Sep 17 00:00:00 2001
>>> +From: Peter Seiderer <ps.report@gmx.net>
>>> +Date: Sun, 27 Apr 2014 13:23:41 +0200
>>> +Subject: [PATCH 6/8] configure.ac: add '--disable-python-binding' option
>>
>>  Same remark about avoiding 6/8 (the reasoning is: if later on patches 7
>> and 8 disappear and patch 9 is added, it looks strange to have the /8 there).
>>
> 
> O.k, will fix...
> 
>>> +
>>> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>>> +---
>>> + Makefile.am  |  2 +-
>>> + configure.ac | 11 +++++++++++
>>> + 2 files changed, 12 insertions(+), 1 deletion(-)
>>> +
>>> +diff --git a/Makefile.am b/Makefile.am
>>> +index a83b35f..446ec4c 100644
>>> +--- a/Makefile.am
>>> ++++ b/Makefile.am
>>> +@@ -1,4 +1,4 @@
>>> +-SUBDIRS = src tools python $(SUBDIR_TESTS)
>>> ++SUBDIRS = src tools $(SUBDIR_PYTHON_BINDING) $(SUBDIR_TESTS)
>>> + 
>>> + pkgconfigdir = $(libdir)/pkgconfig
>>> + pkgconfig_DATA = evemu.pc
>>> +diff --git a/configure.ac b/configure.ac
>>> +index 4e0c3b8..bb49bbc 100644
>>> +--- a/configure.ac
>>> ++++ b/configure.ac
>>> +@@ -52,6 +52,17 @@ AS_IF([test "x$enable_tests" != "xno"], [
>>> + 
>>> + AC_SUBST([SUBDIR_TESTS])
>>> + 
>>> ++AC_ARG_ENABLE([python-binding],
>>> ++	AS_HELP_STRING([--disable-python-binding],
>>> ++		 [Disable generation of python binding]))
>>
>>  bindings is typically used in plural. And actually, most packages will
>> call it --enable-python or --with-python.
>>
> 
> O.k, will fix the s/binding/bindings/. Used '--disable-python-binding' because of
> the analogy to '--disable-tests' and I did not want to change the default behaviour
> of the original evemu source package...

 Sorry, I didn't formulate that correctly. I meant --disable-python or
--without-python, i.e. most packages don't add -bindings to it. Though I
have to say, it's probably more correct with the -bindings.

> 
>>
>>> ++
>>> ++AS_IF([test "x$enable_python_binding" != "xno"], [
>>> ++	SUBDIR_PYTHON_BINDING=python
>>> ++])
>>> ++
>>> ++AC_SUBST([SUBDIR_PYTHON_BINDING])
>>> ++
>>> ++
>>> + AC_SUBST(AM_CFLAGS,
>>> +          "-Wall -Wextra -pedantic")
>>> + 
>>> +-- 
>>> +1.8.1.4
>>> +
>>> diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
>>> index 07ad6f6..44b8b89 100644
>>> --- a/package/evemu/evemu.mk
>>> +++ b/package/evemu/evemu.mk
>>> @@ -27,6 +27,14 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
>>>  # Needs Python for header file generation
>>>  EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
>>>  
>>> +# Check for target python (python3 binding disabled because
>>> +# of build/byte-compile problems)
>>> +ifeq ($(BR2_PACKAGE_PYTHON),y)
>>> +	EVEMU_DEPENDENCIES += python
>>
>>  We normally put an explicit --enable-python-binding(s) here.
> 
> ... see above, enabled is the default....

 Even though it is the default, we add it explicitly. This makes it
easier to keep things consistent if e.g. the default behaviour changes
after an upgrade.


 Regards,
 Arnout

> 
>>
>>  Also, we don't normally indent inside conditions in .mk files
>> (indentation is reserved for commands and for continuation lines of
>> assignments).
> 
> O.k, will fix...
> 
> Regards,
> Peter
> 
>>
>>  Regards,
>>  Arnout
>>
>>> +else
>>> +	EVEMU_CONF_OPT += --disable-python-binding
>>> +endif
>>> +
>>>  # package source code coming from git, so it doesn't have generated
>>>  # configure and Makefile.in
>>>  EVEMU_AUTORECONF = YES
>>>
>>
>>
>> -- 
>> 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
>>


-- 
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

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

* [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
  2014-04-28 21:01       ` Arnout Vandecappelle
@ 2014-04-28 22:08         ` Peter Seiderer
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Seiderer @ 2014-04-28 22:08 UTC (permalink / raw)
  To: buildroot

Hello Arnout,

> Gesendet: Montag, 28. April 2014 um 23:01 Uhr
> Von: "Arnout Vandecappelle" <arnout@mind.be>
> An: "Peter Seiderer" <ps.report@gmx.net>
> Cc: buildroot at busybox.net, "Peter Korsgaard" <jacmet@uclibc.org>
> Betreff: Re: Aw: Re: [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
>
> On 28/04/14 22:53, Peter Seiderer wrote:
> > Hello Arnout,
> > 
> >> Gesendet: Montag, 28. April 2014 um 21:48 Uhr
> >> Von: "Arnout Vandecappelle" <arnout@mind.be>
> >> An: "Peter Seiderer" <ps.report@gmx.net>, buildroot at busybox.net
> >> Cc: "Peter Korsgaard" <jacmet@uclibc.org>
> >> Betreff: Re: [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled
> >>
> >> On 28/04/14 21:00, Peter Seiderer wrote:
> >>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >>> ---
> >>>  ...gure.ac-add-disable-python-binding-option.patch | 46 ++++++++++++++++++++++
> >>>  package/evemu/evemu.mk                             |  8 ++++
> >>>  2 files changed, 54 insertions(+)
> >>>  create mode 100644 package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> >>>
> >>> diff --git a/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> >>> new file mode 100644
> >>> index 0000000..f100b2e
> >>> --- /dev/null
> >>> +++ b/package/evemu/evemu-0006-configure.ac-add-disable-python-binding-option.patch
> >>> @@ -0,0 +1,46 @@
> >>> +From 44f42cfa6b58a256d3b89bce1043b0efed7eeaeb Mon Sep 17 00:00:00 2001
> >>> +From: Peter Seiderer <ps.report@gmx.net>
> >>> +Date: Sun, 27 Apr 2014 13:23:41 +0200
> >>> +Subject: [PATCH 6/8] configure.ac: add '--disable-python-binding' option
> >>
> >>  Same remark about avoiding 6/8 (the reasoning is: if later on patches 7
> >> and 8 disappear and patch 9 is added, it looks strange to have the /8 there).
> >>
> > 
> > O.k, will fix...
> > 
> >>> +
> >>> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >>> +---
> >>> + Makefile.am  |  2 +-
> >>> + configure.ac | 11 +++++++++++
> >>> + 2 files changed, 12 insertions(+), 1 deletion(-)
> >>> +
> >>> +diff --git a/Makefile.am b/Makefile.am
> >>> +index a83b35f..446ec4c 100644
> >>> +--- a/Makefile.am
> >>> ++++ b/Makefile.am
> >>> +@@ -1,4 +1,4 @@
> >>> +-SUBDIRS = src tools python $(SUBDIR_TESTS)
> >>> ++SUBDIRS = src tools $(SUBDIR_PYTHON_BINDING) $(SUBDIR_TESTS)
> >>> + 
> >>> + pkgconfigdir = $(libdir)/pkgconfig
> >>> + pkgconfig_DATA = evemu.pc
> >>> +diff --git a/configure.ac b/configure.ac
> >>> +index 4e0c3b8..bb49bbc 100644
> >>> +--- a/configure.ac
> >>> ++++ b/configure.ac
> >>> +@@ -52,6 +52,17 @@ AS_IF([test "x$enable_tests" != "xno"], [
> >>> + 
> >>> + AC_SUBST([SUBDIR_TESTS])
> >>> + 
> >>> ++AC_ARG_ENABLE([python-binding],
> >>> ++	AS_HELP_STRING([--disable-python-binding],
> >>> ++		 [Disable generation of python binding]))
> >>
> >>  bindings is typically used in plural. And actually, most packages will
> >> call it --enable-python or --with-python.
> >>
> > 
> > O.k, will fix the s/binding/bindings/. Used '--disable-python-binding' because of
> > the analogy to '--disable-tests' and I did not want to change the default behaviour
> > of the original evemu source package...
> 
>  Sorry, I didn't formulate that correctly. I meant --disable-python or
> --without-python, i.e. most packages don't add -bindings to it. Though I
> have to say, it's probably more correct with the -bindings.
> 
> > 
> >>
> >>> ++
> >>> ++AS_IF([test "x$enable_python_binding" != "xno"], [
> >>> ++	SUBDIR_PYTHON_BINDING=python
> >>> ++])
> >>> ++
> >>> ++AC_SUBST([SUBDIR_PYTHON_BINDING])
> >>> ++
> >>> ++
> >>> + AC_SUBST(AM_CFLAGS,
> >>> +          "-Wall -Wextra -pedantic")
> >>> + 
> >>> +-- 
> >>> +1.8.1.4
> >>> +
> >>> diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk
> >>> index 07ad6f6..44b8b89 100644
> >>> --- a/package/evemu/evemu.mk
> >>> +++ b/package/evemu/evemu.mk
> >>> @@ -27,6 +27,14 @@ EVEMU_DEPENDENCIES = host-pkgconf libevdev
> >>>  # Needs Python for header file generation
> >>>  EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
> >>>  
> >>> +# Check for target python (python3 binding disabled because
> >>> +# of build/byte-compile problems)
> >>> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> >>> +	EVEMU_DEPENDENCIES += python
> >>
> >>  We normally put an explicit --enable-python-binding(s) here.
> > 
> > ... see above, enabled is the default....
> 
>  Even though it is the default, we add it explicitly. This makes it
> easier to keep things consistent if e.g. the default behaviour changes
> after an upgrade.
> 

O.k., will fix...

Regards,
Peter

> 
>  Regards,
>  Arnout
> 
> > 
> >>
> >>  Also, we don't normally indent inside conditions in .mk files
> >> (indentation is reserved for commands and for continuation lines of
> >> assignments).
> > 
> > O.k, will fix...
> > 
> > Regards,
> > Peter
> > 
> >>
> >>  Regards,
> >>  Arnout
> >>
> >>> +else
> >>> +	EVEMU_CONF_OPT += --disable-python-binding
> >>> +endif
> >>> +
> >>>  # package source code coming from git, so it doesn't have generated
> >>>  # configure and Makefile.in
> >>>  EVEMU_AUTORECONF = YES
> >>>
> >>
> >>
> >> -- 
> >> 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
> >>
> 
> 
> -- 
> 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
> 

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

end of thread, other threads:[~2014-04-28 22:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 19:00 [Buildroot] [PATCH 0/4] evemu: disable python binding if not needed Peter Seiderer
2014-04-28 19:00 ` [Buildroot] [PATCH 1/4] evemu: disable tests via evemu configure option Peter Seiderer
2014-04-28 19:27   ` Arnout Vandecappelle
2014-04-28 20:48     ` Peter Seiderer
2014-04-28 19:00 ` [Buildroot] [PATCH 2/4] evemu: fix host-python/host-python3 dependency Peter Seiderer
2014-04-28 19:28   ` Arnout Vandecappelle
2014-04-28 19:00 ` [Buildroot] [PATCH 3/4] evemu: build python2 binding only if target python2 is enabled Peter Seiderer
2014-04-28 19:48   ` Arnout Vandecappelle
2014-04-28 20:53     ` Peter Seiderer
2014-04-28 21:01       ` Arnout Vandecappelle
2014-04-28 22:08         ` Peter Seiderer
2014-04-28 19:00 ` [Buildroot] [PATCH 4/4] evemu: enable python3 bindings Peter Seiderer

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