All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] owfs: install python bindings in the correct location
@ 2016-11-03 20:36 Arnout Vandecappelle
  2016-11-03 21:16 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Arnout Vandecappelle @ 2016-11-03 20:36 UTC (permalink / raw)
  To: buildroot

The owfs build system has a pretty complicated way of configuring the
Python bindings. It ends up with setting PYSITEDIR to the host-python
site-packages path, and it still prepends DESTDIR to that.

As a simple fix, override PYSITEDIR with the correct value on the make
command line.

Fixes:
http://autobuild.buildroot.net/results/200/200846650641494290aa67d28ea6fb2c9351d4dc
http://autobuild.buildroot.net/results/99c/99c00248dd8b00071bcdbc73336cc276c68a4c16
and many more

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: use an intermediate OWFS_EXTRA_MAKE_OPTS instead of directly
    overwriting OWFS_MAKE, so it is easier to append stuff.
---
 package/owfs/owfs.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/owfs/owfs.mk b/package/owfs/owfs.mk
index 83614af..e0679d2 100644
--- a/package/owfs/owfs.mk
+++ b/package/owfs/owfs.mk
@@ -66,6 +66,13 @@ OWFS_MAKE_ENV += \
 	_python_prefix=/usr \
 	_python_exec_prefix=/usr
 OWFS_DEPENDENCIES += python host-swig
+# The configure scripts finds PYSITEDIR as the python_lib directory of
+# host-python, and then prepends DESTDIR in front of it. So we end up
+# installing things in $(TARGET_DIR)/$(HOST_DIR)/usr/lib/python which is
+# clearly wrong.
+# Patching owfs to do the right thing is not trivial, it's much easier to
+# override the PYSITEDIR variable in make.
+OWFS_EXTRA_MAKE_OPTS += PYSITEDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
 else
 OWFS_CONF_OPTS += --disable-owpython --without-python
 endif
@@ -75,6 +82,8 @@ ifeq ($(BR2_STATIC_LIBS),y)
 OWFS_CONF_OPTS += --disable-zero
 endif
 
+OWFS_MAKE = $(MAKE) $(OWFS_EXTRA_MAKE_OPTS)
+
 define OWFS_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S25owserver \
 		$(TARGET_DIR)/etc/init.d/S25owserver
-- 
2.9.3

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

* [Buildroot] [PATCH v2] owfs: install python bindings in the correct location
  2016-11-03 20:36 [Buildroot] [PATCH v2] owfs: install python bindings in the correct location Arnout Vandecappelle
@ 2016-11-03 21:16 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-11-03 21:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 3 Nov 2016 21:36:04 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The owfs build system has a pretty complicated way of configuring the
> Python bindings. It ends up with setting PYSITEDIR to the host-python
> site-packages path, and it still prepends DESTDIR to that.
> 
> As a simple fix, override PYSITEDIR with the correct value on the make
> command line.
> 
> Fixes:
> http://autobuild.buildroot.net/results/200/200846650641494290aa67d28ea6fb2c9351d4dc
> http://autobuild.buildroot.net/results/99c/99c00248dd8b00071bcdbc73336cc276c68a4c16
> and many more
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v2: use an intermediate OWFS_EXTRA_MAKE_OPTS instead of directly
>     overwriting OWFS_MAKE, so it is easier to append stuff.
> ---
>  package/owfs/owfs.mk | 9 +++++++++
>  1 file changed, 9 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-11-03 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03 20:36 [Buildroot] [PATCH v2] owfs: install python bindings in the correct location Arnout Vandecappelle
2016-11-03 21:16 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.