Skip to content

Commit b308664

Browse files
llnl-fespholm10
authored andcommitted
Raises an error if the make fails
1 parent 71d67c3 commit b308664

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

setup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ def run(self):
7777
raise SystemExit("Python versions < 3 not supported")
7878
else:
7979
if petsc == 0:
80-
call(['make', '-f','Makefile.Forthon'])
80+
status = call(['make', '-f','Makefile.Forthon'])
8181
else:
82-
call(['make', '-f', 'Makefile.PETSc'])
82+
status = call(['make', '-f', 'Makefile.PETSc'])
83+
if status != 0: raise SystemExit("Build failure")
8384
build.run(self)
8485

8586

@@ -89,9 +90,10 @@ def run(self):
8990
raise SystemExit("Python versions < 3 not supported")
9091
else:
9192
if petsc == 0:
92-
call(['make', '-f', 'Makefile.Forthon', 'clean'])
93+
status = call(['make', '-f', 'Makefile.Forthon', 'clean'])
9394
else:
94-
call(['make', '-f', 'Makefile.PETSc', 'clean'])
95+
status = call(['make', '-f', 'Makefile.PETSc', 'clean'])
96+
if status != 0: raise SystemExit("Clean failure")
9597

9698
uedgepkgs = ['aph', 'api', 'bbb', 'com', 'flx', 'grd', 'svr', 'wdf', 'ncl']
9799

0 commit comments

Comments
 (0)