[PATCH] Porting Samba's CPython extensions to Python 3

Petr Viktorin pviktori at redhat.com
Thu Jul 14 09:56:59 UTC 2016


On 07/11/2016 05:21 PM, Stefan Metzmacher wrote:
> Hi Petr,
>
>> Sorry for the delay – I've been working on porting FreeIPA for a few
>> months.
>>
>> I've spoken with Alexander Bokovoy earlier, and we agreed that adding a
>> third_party module might be too much overhead for what is essentially a
>> single header file.
>>
>> So, I present two options, and I'm attaching patches that port the
>> "samba.credentials" module as example usage.
>> - third_party/py3c, a copy of the (MIT-licensed) py3c project, with
>> corresponding build system integration. (I'm not sure if I did the
>> integration correctly; there's probably a better way to add a
>> header-only third-party library to Waf-samba)
>> - lib/py3compat.h, a relatively simple header with the necessary macros.
>> (I forked this from py3c when I was still the sole author, but the
>> latter additions are not relevant to Samba.)
>
> I'd prefer a single py3compat.h it's simple enough, but I'd located it under
> python/ or python/compat/ instead of lib/
>
> metze


That does sound better. Here is a patchset that puts the header in python/.



-- 
Petr Viktorin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-Add-py3compat.h.patch
Type: text/x-patch
Size: 6181 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160714/8e7eccda/0001-python-Add-py3compat.h.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-samba.credentials-Port-to-Python-3.patch
Type: text/x-patch
Size: 7495 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160714/8e7eccda/0002-samba.credentials-Port-to-Python-3.bin>


More information about the samba-technical mailing list