mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Börje Sewing" <boerje.sewing@who-ing.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] libgpiod: add support for python3 bindings.
Date: Thu, 30 Aug 2018 13:06:06 +0200	[thread overview]
Message-ID: <574e7d59-3636-a61b-1554-fcc3d1ae8551@who-ing.de> (raw)
In-Reply-To: <20180829140459.5dvplya2smgsbim6@pengutronix.de>



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

      parent reply	other threads:[~2018-08-30 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 13:58 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574e7d59-3636-a61b-1554-fcc3d1ae8551@who-ing.de \
    --to=boerje.sewing@who-ing.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox