[PATCHES] Generate shorter name for extra python files

Andrew Bartlett abartlet at samba.org
Sun Jul 9 20:33:51 UTC 2017

On Sat, 2017-07-08 at 21:16 +0200, Lukas Slebodnik wrote:
> On (07/07/17 14:30), Lukas Slebodnik via samba-technical wrote:
> > On (07/07/17 10:18), Andrew Bartlett wrote:
> > > OK.  Please continue working until it is.
> > > 
> > > The things we need:
> > > 
> > > Remove both cpython-35m-x86_64-linux-gnu and 3.5 from
> > > - ABI/*.sigs files
> > > 
> > 
> > I am not really sure how are symbols generated in libldb with waf
> > from files in directory lib/ldb/ABI/ because I am used to different definition
> > of version symbols in libraries http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_25.html
> > But IIRC it does not work on all UNIX like systems which are supported by samba.
> > 
> I played a little bit with waf and python debuger (pdb)
> And I found how and where is version script(vscript) generated.
> > Could you describe what is a problematic? Why it is problematic?
> > And how it should look like?
> > 
> I just would like to know what is problematic for libpyldb-util generated from
> standard python and for extra python.

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.

Andrew Bartlett

Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list