Ups, I replied to the old version, but the comments are still valid for v2.

Michael

On Wed, Aug 29, 2018 at 04:04:59PM +0200, Michael Olbrich wrote:
> On Fri, Aug 24, 2018 at 03:58:38PM +0200, Boerje Sewing wrote:
> > Signed-off-by: Boerje Sewing <[email protected]>
> > ---
> >  rules/libgpiod.in   |  8 ++++++++
> >  rules/libgpiod.make | 20 ++++++++++++++++++--
> >  2 files changed, 26 insertions(+), 2 deletions(-)
> > 
> > diff --git a/rules/libgpiod.in b/rules/libgpiod.in
> > index d3d0c6002..ad52d6f10 100644
> > --- a/rules/libgpiod.in
> > +++ b/rules/libgpiod.in
> > @@ -55,4 +55,12 @@ config LIBGPIOD_GPIOMON
> >     help
> >       Waits for events on a GPIO line
> >  
> > +config LIBGPIOD_PYTHON3
> > +        bool
> > +   prompt "Install python3 bindings"
> > +   select PYTHON3
> 
> In the top-level option:
> 
>       select PYTHON3 if LIBGPIOD_PYTHON3
> 
> Otherwise the dependencies are broken.
> 
> > +   select HOST_SYSTEM_PYTHON3
> 
> This should not be needed.
> 
> > +   help
> > +     Provides bindings for Python 3
> > +
> >  endif
> > diff --git a/rules/libgpiod.make b/rules/libgpiod.make
> > index ed677c2d5..888597ce3 100644
> > --- a/rules/libgpiod.make
> > +++ b/rules/libgpiod.make
> > @@ -35,8 +35,16 @@ LIBGPIOD_CONF_OPT        := \
> >     $(CROSS_AUTOCONF_USR) \
> >     --$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
> >     --disable-tests \
> > -   --disable-bindings-cxx \
> > -   --disable-bindings-python
> > +   --disable-bindings-cxx
> > +
> > +ifdef PTXCONF_LIBGPIOD_PYTHON3
> > +LIBGPIOD_CONF_OPT  += --enable-bindings-python
> > +LIBGPIOD_CONF_ENV := \
> > +   $(CROSS_ENV) \
> > +   ac_cv_path_PYTHON=$(CROSS_PYTHON3)
> > +else
> > +LIBGPIOD_CONF_OPT  += --disable-bindings-python
> > +endif
> >  
> >  # libgpiod requires kernel headers >= 4.8
> >  ifdef PTXCONF_KERNEL_HEADER
> > @@ -71,6 +79,14 @@ $(STATEDIR)/libgpiod.targetinstall:
> >                     /usr/bin/$$tool); \
> >     done
> >  
> > +ifdef PTXCONF_LIBGPIOD_PYTHON3
> > +   @$(call install_copy, libgpiod, 0, 0, 0755, $(PYTHON3_SITEPACKAGES))
> > +   @for file in $(shell cd $(LIBGPIOD_PKGDIR) && find . -name "gpiod.*"); \
> > +   do \
> > +           $(call install_copy, libgpiod, 0, 0, 0644, -, /$$file); \
> > +   done
> 
> I think this can be handled with install_glob. Take a look at the various
> python modules.
> 
> Michael
> 
> > +endif
> > +
> >     @$(call install_finish, libgpiod)
> >  
> >     @$(call touch)
> > -- 
> > 2.18.0
> > 
> > 
> > _______________________________________________
> > ptxdist mailing list
> > [email protected]
> 
> -- 
> 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
> [email protected]

-- 
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
[email protected]

Reply via email to