fix generator.py call in scons 3
scons 3 still untested
This commit is contained in:
parent
a97dad4db5
commit
553b36b31c
12
SConstruct
12
SConstruct
@ -1,12 +1,12 @@
|
|||||||
import sys
|
import sys
|
||||||
#run generator.py
|
#run generator.py
|
||||||
if sys.version_info[0] >= 3:
|
|
||||||
def execfile(path):
|
|
||||||
with open(path, 'r') as f:
|
|
||||||
exec(f.read())
|
|
||||||
|
|
||||||
if not GetOption('clean'):
|
if not GetOption('clean'):
|
||||||
execfile("generator.py")
|
if sys.version_info[0] < 3:
|
||||||
|
execfile("generator.py")
|
||||||
|
else:
|
||||||
|
with open("generator.py") as f:
|
||||||
|
code = compile(f.read(), "generator.py", 'exec')
|
||||||
|
exec(code)
|
||||||
|
|
||||||
AddOption('--builddir',dest="builddir",default="build",help="Directory to build to.")
|
AddOption('--builddir',dest="builddir",default="build",help="Directory to build to.")
|
||||||
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)
|
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)
|
||||||
|
Reference in New Issue
Block a user