ExportImportShortcutHack

garyo edited this page Dec 13, 2014 · 1 revision
#!python 
# 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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.