* [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
@ 2018-08-30 11:11 Boerje Sewing
2018-08-30 12:53 ` Andreas Schmidt
0 siblings, 1 reply; 6+ messages in thread
From: Boerje Sewing @ 2018-08-30 11:11 UTC (permalink / raw)
To: ptxdist; +Cc: clemens.gruber
Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de>
---
Changes in v3:
- Fix python dependency in Kconfig file (thanks Michael)
- Remove unnecessary host python selection in Kconfig (thanks Michael)
- Simplify library copy process in Makefile (thanks Michael)
Changes in v2:
- Shorten the Makefile (thanks Denis)
- Fix indentation in Kconfig file (thanks Ladislav)
rules/libgpiod.in | 8 ++++++++
rules/libgpiod.make | 10 +++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/rules/libgpiod.in b/rules/libgpiod.in
index d3d0c6002..c871dc484 100644
--- a/rules/libgpiod.in
+++ b/rules/libgpiod.in
@@ -3,6 +3,7 @@
menuconfig LIBGPIOD
tristate
prompt "libgpiod "
+ select PYTHON3 if LIBGPIOD_PYTHON3
help
libgpiod is a library accompanied by a set of tools for
interacting with the Linux GPIO character device.
@@ -55,4 +56,11 @@ config LIBGPIOD_GPIOMON
help
Waits for events on a GPIO line
+config LIBGPIOD_PYTHON3
+ bool
+ prompt "Install python3 bindings"
+ select PYTHON3
+ help
+ Provides bindings for Python 3
+
endif
diff --git a/rules/libgpiod.make b/rules/libgpiod.make
index ed677c2d5..ef70324ec 100644
--- a/rules/libgpiod.make
+++ b/rules/libgpiod.make
@@ -36,7 +36,11 @@ LIBGPIOD_CONF_OPT := \
--$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
--disable-tests \
--disable-bindings-cxx \
- --disable-bindings-python
+ --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python
+
+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 +75,10 @@ $(STATEDIR)/libgpiod.targetinstall:
/usr/bin/$$tool); \
done
+ifdef PTXCONF_LIBGPIOD_PYTHON3
+ @$(call install_glob, libgpiod, 0, 0, -, $(PYTHON3_SITEPACKAGES),, gpiod.*)
+endif
+
@$(call install_finish, libgpiod)
@$(call touch)
--
2.18.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
2018-08-30 11:11 [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings Boerje Sewing
@ 2018-08-30 12:53 ` Andreas Schmidt
2018-08-30 13:44 ` Michael Olbrich
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schmidt @ 2018-08-30 12:53 UTC (permalink / raw)
To: ptxdist
Hi Boerje,
sorry for my late review.
On 8/30/18 1:11 PM, Boerje Sewing wrote:
> Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de>
> ---
>
> Changes in v3:
> - Fix python dependency in Kconfig file (thanks Michael)
> - Remove unnecessary host python selection in Kconfig (thanks Michael)
> - Simplify library copy process in Makefile (thanks Michael)
>
> Changes in v2:
> - Shorten the Makefile (thanks Denis)
> - Fix indentation in Kconfig file (thanks Ladislav)
>
> rules/libgpiod.in | 8 ++++++++
> rules/libgpiod.make | 10 +++++++++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/rules/libgpiod.in b/rules/libgpiod.in
> index d3d0c6002..c871dc484 100644
> --- a/rules/libgpiod.in
> +++ b/rules/libgpiod.in
> @@ -3,6 +3,7 @@
> menuconfig LIBGPIOD
> tristate
> prompt "libgpiod "
> + select PYTHON3 if LIBGPIOD_PYTHON3
> help
> libgpiod is a library accompanied by a set of tools for
> interacting with the Linux GPIO character device.
> @@ -55,4 +56,11 @@ config LIBGPIOD_GPIOMON
> help
> Waits for events on a GPIO line
>
> +config LIBGPIOD_PYTHON3
Rename this to PYTHON3_LIBGPIOD, like all other python3 bindings.
> + bool
> + prompt "Install python3 bindings"
> + select PYTHON3
> + help
> + Provides bindings for Python 3
> +
I think it is better to move the python3-libgpiod bindings to other
python3 binding.
(SECTION=python3) Isn't it?
And, in additional, create own file for that. See python3-six.in or other
python3-*.in bindings files for example. Of course you have set the
"select" and "depends"
in right way. (If user select python3-libgpiod binding, libgpiod should
be select automatically)
> endif
> diff --git a/rules/libgpiod.make b/rules/libgpiod.make
> index ed677c2d5..ef70324ec 100644
> --- a/rules/libgpiod.make
> +++ b/rules/libgpiod.make
> @@ -36,7 +36,11 @@ LIBGPIOD_CONF_OPT := \
> --$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
> --disable-tests \
> --disable-bindings-cxx \
> - --disable-bindings-python
> + --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python
reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
> +
> +LIBGPIOD_CONF_ENV := \
> + $(CROSS_ENV) \
> + $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3))
reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>
> # libgpiod requires kernel headers >= 4.8
> ifdef PTXCONF_KERNEL_HEADER
> @@ -71,6 +75,10 @@ $(STATEDIR)/libgpiod.targetinstall:
> /usr/bin/$$tool); \
> done
>
> +ifdef PTXCONF_LIBGPIOD_PYTHON3
> + @$(call install_glob, libgpiod, 0, 0, -, $(PYTHON3_SITEPACKAGES),, gpiod.*)
> +endif
> +
reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
> @$(call install_finish, libgpiod)
>
> @$(call touch)
Best regards,
Andreas
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
2018-08-30 12:53 ` Andreas Schmidt
@ 2018-08-30 13:44 ` Michael Olbrich
2018-08-30 14:12 ` Andreas Schmidt
0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2018-08-30 13:44 UTC (permalink / raw)
To: ptxdist
On Thu, Aug 30, 2018 at 02:53:58PM +0200, Andreas Schmidt wrote:
> Hi Boerje,
>
> sorry for my late review.
>
> On 8/30/18 1:11 PM, Boerje Sewing wrote:
> > Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de>
> > ---
> >
> > Changes in v3:
> > - Fix python dependency in Kconfig file (thanks Michael)
> > - Remove unnecessary host python selection in Kconfig (thanks Michael)
> > - Simplify library copy process in Makefile (thanks Michael)
> >
> > Changes in v2:
> > - Shorten the Makefile (thanks Denis)
> > - Fix indentation in Kconfig file (thanks Ladislav)
> >
> > rules/libgpiod.in | 8 ++++++++
> > rules/libgpiod.make | 10 +++++++++-
> > 2 files changed, 17 insertions(+), 1 deletion(-)
> >
> > diff --git a/rules/libgpiod.in b/rules/libgpiod.in
> > index d3d0c6002..c871dc484 100644
> > --- a/rules/libgpiod.in
> > +++ b/rules/libgpiod.in
> > @@ -3,6 +3,7 @@
> > menuconfig LIBGPIOD
> > tristate
> > prompt "libgpiod "
> > + select PYTHON3 if LIBGPIOD_PYTHON3
> > help
> > libgpiod is a library accompanied by a set of tools for
> > interacting with the Linux GPIO character device.
> > @@ -55,4 +56,11 @@ config LIBGPIOD_GPIOMON
> > help
> > Waits for events on a GPIO line
> > +config LIBGPIOD_PYTHON3
> Rename this to PYTHON3_LIBGPIOD, like all other python3 bindings.
> > + bool
> > + prompt "Install python3 bindings"
> > + select PYTHON3
> > + help
> > + Provides bindings for Python 3
> > +
>
>
> I think it is better to move the python3-libgpiod bindings to other python3
> binding.
>
> (SECTION=python3) Isn't it?
>
> And, in additional, create own file for that. See python3-six.in or other
>
> python3-*.in bindings files for example. Of course you have set the "select"
> and "depends"
>
> in right way. (If user select python3-libgpiod binding, libgpiod should be
> select automatically)
No. It looks good as is. The python3 section is for Python modules. We
already have other packages that include (optional) Python bindings like
this.
Michael
> > endif
> > diff --git a/rules/libgpiod.make b/rules/libgpiod.make
> > index ed677c2d5..ef70324ec 100644
> > --- a/rules/libgpiod.make
> > +++ b/rules/libgpiod.make
> > @@ -36,7 +36,11 @@ LIBGPIOD_CONF_OPT := \
> > --$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
> > --disable-tests \
> > --disable-bindings-cxx \
> > - --disable-bindings-python
> > + --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python
>
>
> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>
>
> > +
> > +LIBGPIOD_CONF_ENV := \
> > + $(CROSS_ENV) \
> > + $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3))
>
>
> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>
>
> > # libgpiod requires kernel headers >= 4.8
> > ifdef PTXCONF_KERNEL_HEADER
> > @@ -71,6 +75,10 @@ $(STATEDIR)/libgpiod.targetinstall:
> > /usr/bin/$$tool); \
> > done
> > +ifdef PTXCONF_LIBGPIOD_PYTHON3
> > + @$(call install_glob, libgpiod, 0, 0, -, $(PYTHON3_SITEPACKAGES),, gpiod.*)
> > +endif
> > +
>
>
> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>
>
> > @$(call install_finish, libgpiod)
> > @$(call touch)
>
>
> Best regards,
>
> Andreas
>
>
> _______________________________________________
> 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] 6+ messages in thread
* Re: [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
2018-08-30 13:44 ` Michael Olbrich
@ 2018-08-30 14:12 ` Andreas Schmidt
2018-08-30 14:32 ` Michael Olbrich
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schmidt @ 2018-08-30 14:12 UTC (permalink / raw)
To: ptxdist
> Am 30.08.2018 um 15:44 schrieb Michael Olbrich <m.olbrich@pengutronix.de>:
>
>> On Thu, Aug 30, 2018 at 02:53:58PM +0200, Andreas Schmidt wrote:
>> Hi Boerje,
>>
>> sorry for my late review.
>>
>>> On 8/30/18 1:11 PM, Boerje Sewing wrote:
>>> Signed-off-by: Boerje Sewing <Boerje.Sewing@who-ing.de>
>>> ---
>>>
>>> Changes in v3:
>>> - Fix python dependency in Kconfig file (thanks Michael)
>>> - Remove unnecessary host python selection in Kconfig (thanks Michael)
>>> - Simplify library copy process in Makefile (thanks Michael)
>>>
>>> Changes in v2:
>>> - Shorten the Makefile (thanks Denis)
>>> - Fix indentation in Kconfig file (thanks Ladislav)
>>>
>>> rules/libgpiod.in | 8 ++++++++
>>> rules/libgpiod.make | 10 +++++++++-
>>> 2 files changed, 17 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/rules/libgpiod.in b/rules/libgpiod.in
>>> index d3d0c6002..c871dc484 100644
>>> --- a/rules/libgpiod.in
>>> +++ b/rules/libgpiod.in
>>> @@ -3,6 +3,7 @@
>>> menuconfig LIBGPIOD
>>> tristate
>>> prompt "libgpiod "
>>> + select PYTHON3 if LIBGPIOD_PYTHON3
>>> help
>>> libgpiod is a library accompanied by a set of tools for
>>> interacting with the Linux GPIO character device.
>>> @@ -55,4 +56,11 @@ config LIBGPIOD_GPIOMON
>>> help
>>> Waits for events on a GPIO line
>>> +config LIBGPIOD_PYTHON3
>> Rename this to PYTHON3_LIBGPIOD, like all other python3 bindings.
>>> + bool
>>> + prompt "Install python3 bindings"
>>> + select PYTHON3
>>> + help
>>> + Provides bindings for Python 3
>>> +
>>
>>
>> I think it is better to move the python3-libgpiod bindings to other python3
>> binding.
>>
>> (SECTION=python3) Isn't it?
>>
>> And, in additional, create own file for that. See python3-six.in or other
>>
>> python3-*.in bindings files for example. Of course you have set the "select"
>> and "depends"
>>
>> in right way. (If user select python3-libgpiod binding, libgpiod should be
>> select automatically)
>
> No. It looks good as is. The python3 section is for Python modules. We
> already have other packages that include (optional) Python bindings like
> this.
Ok, if already other packages do that. I didn’t see them, yet. Sorry.
Andreas
>
> Michael
>
>>> endif
>>> diff --git a/rules/libgpiod.make b/rules/libgpiod.make
>>> index ed677c2d5..ef70324ec 100644
>>> --- a/rules/libgpiod.make
>>> +++ b/rules/libgpiod.make
>>> @@ -36,7 +36,11 @@ LIBGPIOD_CONF_OPT := \
>>> --$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
>>> --disable-tests \
>>> --disable-bindings-cxx \
>>> - --disable-bindings-python
>>> + --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python
>>
>>
>> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>>
>>
>>> +
>>> +LIBGPIOD_CONF_ENV := \
>>> + $(CROSS_ENV) \
>>> + $(if $(PTXCONF_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3))
>>
>>
>> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>>
>>
>>> # libgpiod requires kernel headers >= 4.8
>>> ifdef PTXCONF_KERNEL_HEADER
>>> @@ -71,6 +75,10 @@ $(STATEDIR)/libgpiod.targetinstall:
>>> /usr/bin/$$tool); \
>>> done
>>> +ifdef PTXCONF_LIBGPIOD_PYTHON3
>>> + @$(call install_glob, libgpiod, 0, 0, -, $(PYTHON3_SITEPACKAGES),, gpiod.*)
>>> +endif
>>> +
>>
>>
>> reminder: rename PTXCONF_LIBGPIOD_PYTHON3 to PTXCONF_PYTHON3_LIBGPIOD
>>
>>
>>> @$(call install_finish, libgpiod)
>>> @$(call touch)
>>
>>
>> Best regards,
>>
>> Andreas
>>
>>
>> _______________________________________________
>> 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
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
2018-08-30 14:12 ` Andreas Schmidt
@ 2018-08-30 14:32 ` Michael Olbrich
2018-08-30 16:51 ` Andreas Schmidt
0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2018-08-30 14:32 UTC (permalink / raw)
To: ptxdist
Hi,
On Thu, Aug 30, 2018 at 04:12:19PM +0200, Andreas Schmidt wrote:
[...]
> > No. It looks good as is. The python3 section is for Python modules. We
> > already have other packages that include (optional) Python bindings like
> > this.
>
> Ok, if already other packages do that. I didn’t see them, yet. Sorry.
No problem. I don't mind correcting other reviewers occasionally. After
all, that means I'm not not the only one reviewing patches :-).
Michael
--
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] 6+ messages in thread
* Re: [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings
2018-08-30 14:32 ` Michael Olbrich
@ 2018-08-30 16:51 ` Andreas Schmidt
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schmidt @ 2018-08-30 16:51 UTC (permalink / raw)
To: ptxdist
Hi Michael,
> Am 30.08.2018 um 16:32 schrieb Michael Olbrich <m.olbrich@pengutronix.de>:
>
> Hi,
>
> On Thu, Aug 30, 2018 at 04:12:19PM +0200, Andreas Schmidt wrote:
> [...]
>>> No. It looks good as is. The python3 section is for Python modules. We
>>> already have other packages that include (optional) Python bindings like
>>> this.
>>
>> Ok, if already other packages do that. I didn’t see them, yet. Sorry.
>
> No problem. I don't mind correcting other reviewers occasionally.
I hope you will still correcting me, if I‘m wrong :)
> After
> all, that means I'm not not the only one reviewing patches :-).
>
Not all, but for me interesting patches.
> Michael
>
> --
> 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
Best regards,
Andreas
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-30 16:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 11:11 [ptxdist] [PATCH v3] libgpiod: add support for python3 bindings Boerje Sewing
2018-08-30 12:53 ` Andreas Schmidt
2018-08-30 13:44 ` Michael Olbrich
2018-08-30 14:12 ` Andreas Schmidt
2018-08-30 14:32 ` Michael Olbrich
2018-08-30 16:51 ` Andreas Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox