Skip to content

Commit

Permalink
Improve build dir generation debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed Dec 29, 2017
1 parent cb410e6 commit ff54e07
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import print_function
import os, glob, shutil
from functools import partial
from SCons.Errors import UserError


Expand Down Expand Up @@ -163,11 +164,19 @@ libpythonscript = env.SharedLibrary('pythonscript/pythonscript', sources)[0]
### Generate build dir ###


def do_or_die(func, *args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as exc:
import traceback
traceback.print_exc()
raise UserError('ERROR: %s' % exc)

python_godot_module_srcs = env.Glob('pythonscript/embedded/**/*.py')
env.Command(
env['build_dir'],
[env['backend_dir'], libpythonscript, Dir('#pythonscript/embedded/godot')] + python_godot_module_srcs,
env['generate_build_dir']
partial(do_or_die, env['generate_build_dir'])
)
env.Clean(env['build_dir'], env['build_dir'].path)

Expand Down

0 comments on commit ff54e07

Please sign in to comment.