Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
1 result

swig

  • user avatar
    Benjamin Steltner authored
    5a358daa
    History
    Name Last commit Last update
    ..
    README.md
    generate_swig_iface.py

    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:

    1. A boilerplate pre-processed interface file swig<package>.i_preproc.i is generated that %includes all of the package header (.h) files.

    2. An XML representation of the library is generated by running swig -xml swig<package>.i_preproc.i.

    3. The XML representation is passed to generate_swig_iface.py to generate the actual SWIG interface file swig<package>i.

      This script also handles generic object renaming (e.g. stripping XLAL prefices from functions). See swig_function_prefixes in the /swig/Makefile.am for each package for the list of prefixes that are stripped, and generate_swig_iface.py for the variable and constant renames.

    4. 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 %included first)
      • /swig/SWIG<Package>Omega.i (always %included last)
      • /swig/SWIGOctave.i
      • /swig/SWIGPython.i
    5. The C library for each binding is compiled.