Capture build/install errors from subdirs
Subsystems (2)
PATCH 16/17 Capture build/install errors from subdirs
From 2c67a51c7735b7fa190a5a4e969561638fefe6ae Mon Sep 17 00:00:00 2001
From: Enji Cooper <[email protected]>
Date: Wed, 15 Feb 2023 16:03:54 -0800
Subject: [PATCH 16/17] Capture build/install errors from subdirs
Prior to this change the code would silently fail if one of the subdir build/install operations failed. Capture all non-clean target related failures and percolate them up the stack.
Sponsored by: Dell EMC Isilon
Signed-off-by Enji Cooper <[email protected]>
--- setup.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
setup.py +6 -7
@@ -2,11 +2,9 @@ from __future__ import print_function -from distutils.core import setup - -import sys import os -from os.path import join +import subprocess +import sys DESCRIPTION = """ pynfs
@@ -19,11 +17,12 @@ DIRS = ["xdr", "rpc", "nfs4.1", "nfs4.0"] # Order is important def setup(*args, **kwargs): cwd = os.getcwd() - command = " ".join(sys.argv) for dir in DIRS: print("\n\nMoving to %s" % dir ) - os.chdir(join(cwd, dir)) - os.system("python%s %s" % (sys.version[0], command)) + os.chdir(os.path.join(cwd, dir)) + rc = subprocess.call([sys.executable] + sys.argv) + if "clean" not in sys.argv and rc: + sys.exit(rc) os.chdir(cwd) setup(name = "pynfs",
Signature · 1 line
2.39.0