enable python module build in subdir

George Thessalonikefs george at nlnetlabs.nl
Mon May 9 11:42:38 UTC 2022


Hi Michael,

This is *a* correct place but we prefer issues/PRs through GitHub 
nowadays :)
https://github.com/NLnetLabs/unbound

For this I would like to still keep the current directory since people 
may rely on that already like below:
PYTHON_CPPFLAGS=-I. -I$(srcdir) @PYTHON_CPPFLAGS@

Does that work for you?

Best regards,
-- George


On 28/04/2022 10:42, Michael Tokarev via Unbound-users wrote:
> Ping? Is it not the right place for such changes?
> 
> 17.04.2022 23:37, Michael Tokarev via Unbound-users wrote:
>> Unbound Makefile has two small issues preventing
>> building python modules in a non-source directory
>> (eg in a subdir).
>>
>> First, swig fails to find <libunbound/unbound.h>
>> which is not in build dir but in source dir.
>>
>> Next, libunbound/python/unbound.py is now being
>> generated file, generated in the build dir, not
>> in source dir.
>>
>> This patch fixes them.
>>
>> Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
>>
>> diff --git a/Makefile.in b/Makefile.in
>> index 55125a44..f04db624 100644
>> --- a/Makefile.in
>> +++ b/Makefile.in
>> @@ -59,3 +59,3 @@ CC=@CC@
>>   CPPFLAGS=-I. @CPPFLAGS@
>> -PYTHON_CPPFLAGS=-I. @PYTHON_CPPFLAGS@
>> +PYTHON_CPPFLAGS=-I$(srcdir) @PYTHON_CPPFLAGS@
>>   CFLAGS=-DSRCDIR=$(srcdir) @CFLAGS@
>> @@ -558,3 +558,3 @@ pyunbound-install:
>>       $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG)
>> -    $(INSTALL) -c -m 644 $(srcdir)/libunbound/python/unbound.py 
>> $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py
>> +    $(INSTALL) -c -m 644 libunbound/python/unbound.py 
>> $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py
>>       $(LIBTOOL) --mode=install cp _unbound.la 
>> $(DESTDIR)$(PYTHON_SITE_PKG)
> 



More information about the Unbound-users mailing list