Navigation Menu

Skip to content

Commit

Permalink
fix generator.py call in scons 3
Browse files Browse the repository at this point in the history
scons 3 still untested
  • Loading branch information
jacob1 committed Oct 10, 2017
1 parent a97dad4 commit 553b36b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions SConstruct
@@ -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)
Expand Down

0 comments on commit 553b36b

Please sign in to comment.