[PATCHES] Generate shorter name for extra python files

Lukas Slebodnik lslebodn at redhat.com
Fri Jul 14 19:49:01 UTC 2017

On (14/07/17 08:43), Andrew Bartlett wrote:
>On Tue, 2017-07-11 at 10:50 +0200, Lukas Slebodnik wrote:
>> > The ABI files, which we use in Samba to check when we add new symbols
>> > or change function arguments, need not to be dependent on python
>> > versions, as Samba developers have multiple python3 versions installed,
>> > but we only want one ABI file. 
>> > 
>> > However, the vscript and the generated library needs to be python
>> > version specific.
>> > 
>> > The old code did this by removing the cpython... string from the ABI
>> > file and symbol names before writing the file.  You need to (carefully,
>> > as it is now a shorter and less unique string) do the same.
>> > 
>> Here you are.
>Is it safe to assert that we won't change the ABI with an IS_PYTHON3 or
>similar macro?

py*-util libraries are helper functions for python bindings. And new functions
are added there very rarely. (btw tevent and tdb does not need such libraries).

And these helper libraries will be used just by python bindings.
And IIUC python guarantee ABI in minor release (e.g. 3.4.*)
This is a reaon why there will be different version of library for different
python (2.6, 2.7, 3.5, 3.6 ...) But I am not python developer/mantainer.
Adding Petr Viktorin to CC

>If so, then these are OK (in that respect, I've not done a full
>review), but if it is likely that we will add python3 only helper
>functions to one or other of the py*-util libraries, then we need to
>keep the distinct ABI files for 2 and 3, but not for 3.5, 3.6 et al. 

In theory, that could be solved with extra glob
"p?y?3?-" + $old_glob.

Thank you very much for review.

Sorry for duplicate mail I accidentally removed samba-technical from CC.


More information about the samba-technical mailing list