From 17fd1056a830420f8414e1e5f543b9a2304e0acf Mon Sep 17 00:00:00 2001 From: Bill Meyer Date: Tue, 19 Sep 2023 16:12:08 -0700 Subject: [PATCH] Raises an error if the make fails --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 7a9ce7c4..7e530296 100755 --- a/setup.py +++ b/setup.py @@ -77,9 +77,10 @@ def run(self): raise SystemExit("Python versions < 3 not supported") else: if petsc == 0: - call(['make', '-f','Makefile.Forthon']) + status = call(['make', '-f','Makefile.Forthon']) else: - call(['make', '-f', 'Makefile.PETSc']) + status = call(['make', '-f', 'Makefile.PETSc']) + if status != 0: raise SystemExit("Build failure") build.run(self) @@ -89,9 +90,10 @@ def run(self): raise SystemExit("Python versions < 3 not supported") else: if petsc == 0: - call(['make', '-f', 'Makefile.Forthon', 'clean']) + status = call(['make', '-f', 'Makefile.Forthon', 'clean']) else: - call(['make', '-f', 'Makefile.PETSc', 'clean']) + status = call(['make', '-f', 'Makefile.PETSc', 'clean']) + if status != 0: raise SystemExit("Clean failure") uedgepkgs = ['aph', 'api', 'bbb', 'com', 'flx', 'grd', 'svr', 'wdf', 'ncl']