Skip to content

Commit fd3e844

Browse files
authored
Merge pull request kivy#1645 from inclement/stop_build_on_compileall_error
Made build.py stop running if compileall failed
2 parents c86d9ec + 9f8e300 commit fd3e844

File tree

1 file changed

+7
-1
lines changed
  • pythonforandroid/bootstraps/common/build

1 file changed

+7
-1
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,13 @@ def compile_dir(dfn, optimize_python=True):
260260
if optimize_python:
261261
# -OO = strip docstrings
262262
args.insert(1, '-OO')
263-
subprocess.call(args)
263+
return_code = subprocess.call(args)
264+
265+
if return_code != 0:
266+
print('Error while running "{}"'.format(' '.join(args)))
267+
print('This probably means one of your Python files has a syntax '
268+
'error, see logs above')
269+
exit(1)
264270

265271

266272
def make_package(args):

0 commit comments

Comments
 (0)