* [ptxdist] [PATCH] libgpiod: add support for python3 bindings. @ 2018-08-24 13:58 Boerje Sewing 2018-08-24 14:20 ` Denis OSTERLAND 2018-08-29 14:04 ` Michael Olbrich 0 siblings, 2 replies; 8+ messages in thread From: Boerje Sewing @ 2018-08-24 13:58 UTC (permalink / raw) To: ptxdist; +Cc: clemens.gruber Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> --- 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 + select HOST_SYSTEM_PYTHON3 + 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 +endif + @$(call install_finish, libgpiod) @$(call touch) -- 2.18.0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-24 13:58 [ptxdist] [PATCH] libgpiod: add support for python3 bindings Boerje Sewing @ 2018-08-24 14:20 ` Denis OSTERLAND 2018-08-25 11:33 ` Ladislav Michl 2018-08-27 6:52 ` Börje Sewing 2018-08-29 14:04 ` Michael Olbrich 1 sibling, 2 replies; 8+ messages in thread From: Denis OSTERLAND @ 2018-08-24 14:20 UTC (permalink / raw) To: ptxdist Am Freitag, den 24.08.2018, 15:58 +0200 schrieb Boerje Sewing: > Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> > --- > 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 > + select HOST_SYSTEM_PYTHON3 > + 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 I would suggest: --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python and LIBGPIOD_CONF_ENV := \ $(CROSS_ENV) \ $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3)) > > # 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 > +endif > + > @$(call install_finish, libgpiod) > > @$(call touch) Regards Denis Diehl Connectivity Solutions GmbH Geschäftsführung: Horst Leonberger Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht Nürnberg: HRB 32315 ___________________________________________________________________________________________________ Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-24 14:20 ` Denis OSTERLAND @ 2018-08-25 11:33 ` Ladislav Michl 2018-08-27 6:51 ` Börje Sewing 2018-08-27 6:52 ` Börje Sewing 1 sibling, 1 reply; 8+ messages in thread From: Ladislav Michl @ 2018-08-25 11:33 UTC (permalink / raw) To: ptxdist +1 for suggestion bellow and... On Fri, Aug 24, 2018 at 02:20:36PM +0000, Denis OSTERLAND wrote: > Am Freitag, den 24.08.2018, 15:58 +0200 schrieb Boerje Sewing: > > Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> > > --- > > 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 ... please also fix above indentation. Thank you. > > + prompt "Install python3 bindings" > > + select PYTHON3 > > + select HOST_SYSTEM_PYTHON3 > > + 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 > I would suggest: > --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python > and > LIBGPIOD_CONF_ENV := \ > $(CROSS_ENV) \ > $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3)) > > > > # 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 > > +endif > > + > > @$(call install_finish, libgpiod) > > > > @$(call touch) > Regards Denis > > Diehl Connectivity Solutions GmbH > Geschäftsführung: Horst Leonberger > Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht > Nürnberg: HRB 32315 > ___________________________________________________________________________________________________ > > Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. > Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. > Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. > The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by > mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-25 11:33 ` Ladislav Michl @ 2018-08-27 6:51 ` Börje Sewing 0 siblings, 0 replies; 8+ messages in thread From: Börje Sewing @ 2018-08-27 6:51 UTC (permalink / raw) To: ptxdist, Ladislav Michl On 08/25/2018 01:33 PM, Ladislav Michl wrote: > +1 for suggestion bellow and... > > On Fri, Aug 24, 2018 at 02:20:36PM +0000, Denis OSTERLAND wrote: >> Am Freitag, den 24.08.2018, 15:58 +0200 schrieb Boerje Sewing: >>> Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> >>> --- >>> 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 > > ... please also fix above indentation. Thank you. > Thanks for your review :) Consider it as done (patch v2 will be mailed today). >>> + prompt "Install python3 bindings" >>> + select PYTHON3 >>> + select HOST_SYSTEM_PYTHON3 >>> + 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 >> I would suggest: >> --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python >> and >> LIBGPIOD_CONF_ENV := \ >> $(CROSS_ENV) \ >> $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3)) >>> >>> # 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 >>> +endif >>> + >>> @$(call install_finish, libgpiod) >>> >>> @$(call touch) >> Regards Denis >> >> Diehl Connectivity Solutions GmbH >> Geschäftsführung: Horst Leonberger >> Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht >> Nürnberg: HRB 32315 >> ___________________________________________________________________________________________________ >> >> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. >> Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. >> Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. >> The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by >> mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. >> _______________________________________________ >> ptxdist mailing list >> ptxdist@pengutronix.de > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-24 14:20 ` Denis OSTERLAND 2018-08-25 11:33 ` Ladislav Michl @ 2018-08-27 6:52 ` Börje Sewing 1 sibling, 0 replies; 8+ messages in thread From: Börje Sewing @ 2018-08-27 6:52 UTC (permalink / raw) To: ptxdist, Denis OSTERLAND On 08/24/2018 04:20 PM, Denis OSTERLAND wrote: > Am Freitag, den 24.08.2018, 15:58 +0200 schrieb Boerje Sewing: >> Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> >> --- >> 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 >> + select HOST_SYSTEM_PYTHON3 >> + 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 > I would suggest: > --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python > and > LIBGPIOD_CONF_ENV := \ > $(CROSS_ENV) \ > $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3)) Tanks for your review :) Works and will be in patch v2. >> >> # 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 >> +endif >> + >> @$(call install_finish, libgpiod) >> >> @$(call touch) > Regards Denis > > Diehl Connectivity Solutions GmbH > Geschäftsführung: Horst Leonberger > Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht > Nürnberg: HRB 32315 > ___________________________________________________________________________________________________ > > Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. > Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. > Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. > The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by > mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-24 13:58 [ptxdist] [PATCH] libgpiod: add support for python3 bindings Boerje Sewing 2018-08-24 14:20 ` Denis OSTERLAND @ 2018-08-29 14:04 ` Michael Olbrich 2018-08-29 14:31 ` Michael Olbrich 2018-08-30 11:06 ` Börje Sewing 1 sibling, 2 replies; 8+ messages in thread From: Michael Olbrich @ 2018-08-29 14:04 UTC (permalink / raw) To: ptxdist On Fri, Aug 24, 2018 at 03:58:38PM +0200, Boerje Sewing wrote: > Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> > --- > 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 > 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] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-29 14:04 ` Michael Olbrich @ 2018-08-29 14:31 ` Michael Olbrich 2018-08-30 11:06 ` Börje Sewing 1 sibling, 0 replies; 8+ messages in thread From: Michael Olbrich @ 2018-08-29 14:31 UTC (permalink / raw) To: ptxdist 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 <Boerje.Sewing@who-ing.de> > > --- > > 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 > > 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 -- 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] 8+ messages in thread
* Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings. 2018-08-29 14:04 ` Michael Olbrich 2018-08-29 14:31 ` Michael Olbrich @ 2018-08-30 11:06 ` Börje Sewing 1 sibling, 0 replies; 8+ messages in thread From: Börje Sewing @ 2018-08-30 11:06 UTC (permalink / raw) To: ptxdist On 08/29/2018 04:04 PM, Michael Olbrich wrote: > On Fri, Aug 24, 2018 at 03:58:38PM +0200, Boerje Sewing wrote: >> Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de> >> --- >> 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. > Fixed in v3. Learned a lot by posting this patch :) >> + select HOST_SYSTEM_PYTHON3 > > This should not be needed. > Isn't needed and will be removed in v3. >> + 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 > Thanks for the review :) Will be changed in v3. >> +endif >> + >> @$(call install_finish, libgpiod) >> >> @$(call touch) >> -- >> 2.18.0 >> >> >> _______________________________________________ >> ptxdist mailing list >> ptxdist@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-08-30 11:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-08-24 13:58 [ptxdist] [PATCH] libgpiod: add support for python3 bindings Boerje Sewing 2018-08-24 14:20 ` Denis OSTERLAND 2018-08-25 11:33 ` Ladislav Michl 2018-08-27 6:51 ` Börje Sewing 2018-08-27 6:52 ` Börje Sewing 2018-08-29 14:04 ` Michael Olbrich 2018-08-29 14:31 ` Michael Olbrich 2018-08-30 11:06 ` Börje Sewing
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox