Skip to content

ExportImportShortcutHack

Mats Wichmann edited this page Oct 6, 2021 · 2 revisions
# Instantiate an extension of Environment with custom functions
# such as "jcompile" and "jtest".
e = JEnvironment(...)

# The following hack allows to avoid the Import("*") call and the exports
# parameter of the SConscript() call in SConscript files.
SCons.Script._SConscript.GlobalDict.update(
    {
        "e": e,
        "jcompile": e.jcompile,
        "jtest": e.jtest,
    }
)
Clone this wiki locally