LALSuite SWIG Bindings
The LALSuite C libraries are wrapped using SWIG to provide Octave and Python bindings for each library.
The wrappings are built as follows:
-
A boilerplate pre-processed interface file
swig<package>.i_preproc.i
is generated that%include
s all of the package header (.h
) files. -
An XML representation of the library is generated by running
swig -xml swig<package>.i_preproc.i
. -
The XML representation is passed to
generate_swig_iface.py
to generate the actual SWIG interface fileswig<package>i
.This script also handles generic object renaming (e.g. stripping
XLAL
prefices from functions). Seeswig_function_prefixes
in the/swig/Makefile.am
for each package for the list of prefixes that are stripped, andgenerate_swig_iface.py
for the variable and constant renames. -
The SWIG C library files for each high-level binding are generated by running
swig -{octave,python} swig<package>.i
.The following files modify the build for each subpackage:
-
/swig/SWIGCommon.i
(LAL only) -
/swig/SWIG<Package>Alpha.i
(always%include
d first) -
/swig/SWIG<Package>Omega.i
(always%include
d last) /swig/SWIGOctave.i
/swig/SWIGPython.i
-
-
The C library for each binding is compiled.