From 9e5a3373aad7bce9b32b4fac52c53857fec33309 Mon Sep 17 00:00:00 2001 From: Alan Iwi Date: Tue, 26 Mar 2024 16:51:15 +0000 Subject: [PATCH 1/2] UNTESTED: do "make clean" in umlib build (remove .o files to save a little disk space) --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index fa9ab09dce..d25dea615f 100755 --- a/setup.py +++ b/setup.py @@ -70,13 +70,15 @@ def run(self): ) cmd = ["make", "-C", build_dir] + cmd_clean = ["make", "-C", build_dir, "clean"] def compile(): print("*" * 80) print("Running:", " ".join(cmd), "\n") try: - rc = subprocess.call(cmd) + # if compile returns 0, clean will also be run + rc = subprocess.call(cmd) or subprocess.call(cmd_clean) except Exception as error: print(error) rc = 40 @@ -96,8 +98,8 @@ def compile(): print( " In particular, netCDF file processing is " "unaffected." - ) - + ) + print("-" * 80) print("\n", "*" * 80) print() From 7b67d60d48b9c5b3bbaf1e33cd081bf40e0c7725 Mon Sep 17 00:00:00 2001 From: Alan Iwi Date: Tue, 26 Mar 2024 17:04:39 +0000 Subject: [PATCH 2/2] tidy whitespace --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index d25dea615f..d5317cbe44 100755 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ def compile(): print("Running:", " ".join(cmd), "\n") try: - # if compile returns 0, clean will also be run + # if compile returns 0, clean will also be run rc = subprocess.call(cmd) or subprocess.call(cmd_clean) except Exception as error: print(error) @@ -98,8 +98,7 @@ def compile(): print( " In particular, netCDF file processing is " "unaffected." - ) - + ) print("-" * 80) print("\n", "*" * 80) print()