Move do_sconscript to site_init
This commit is contained in:
parent
857516b6ed
commit
dcad550500
2 changed files with 8 additions and 11 deletions
10
SConstruct
10
SConstruct
|
@ -20,16 +20,6 @@ SRC_DIR = Dir('#src')
|
|||
TEST_DIR = Dir('#test')
|
||||
|
||||
|
||||
def do_sconscript(env, src_dir, out_dir):
|
||||
sconscript = src_dir.File('SConscript')
|
||||
print 'Reading {}'.format(sconscript)
|
||||
# Swapping env and build_env here is a bit wacky. Doing so means that env is
|
||||
# always the Environment that the SConscript should be building with, while
|
||||
# build_env is the Environment we're using to put everything together.
|
||||
env.SConscript(sconscript,
|
||||
{'env': env.Clone(), 'build_env': env},
|
||||
variant_dir=out_dir)
|
||||
|
||||
modes = {
|
||||
'debug': erw.DebugEnvironment(succinct=not BUILD_CMDS),
|
||||
'beta': erw.BetaEnvironment(succinct=not BUILD_CMDS),
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
# site_init.py
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
import erw
|
||||
|
||||
def do_sconscript(env, src_dir, out_dir):
|
||||
'''
|
||||
Look for a SConscript file in `src_dir` and run it. Return any result.
|
||||
'''
|
||||
sconscript = src_dir.File('SConscript')
|
||||
print 'Reading {}'.format(sconscript)
|
||||
return env.SConscript(sconscript, {'env': env}, variant_dir=out_dir)
|
||||
|
||||
#
|
||||
# Argument utils
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue