fix generator.py call in scons 3

scons 3 still untested
This commit is contained in:
jacob1 2017-10-09 23:59:50 -04:00
parent a97dad4db5
commit 553b36b31c

View File

@ -1,12 +1,12 @@
import sys
#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'):
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.")
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)