* [PATCH 16/17] Capture build/install errors from subdirs
@ 2023-02-15 23:41 Enji Cooper
0 siblings, 0 replies; only message in thread
From: Enji Cooper @ 2023-02-15 23:41 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs
[-- Attachment #1.1: 0001-Capture-build-install-errors-from-subdirs.patch --]
[-- Type: application/octet-stream, Size: 1472 bytes --]
From 2c67a51c7735b7fa190a5a4e969561638fefe6ae Mon Sep 17 00:00:00 2001
From: Enji Cooper <yaneurabeya@gmail.com>
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 <yaneurabeya@gmail.com>
---
setup.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 83dc6b5..4ec5d92 100755
--- a/setup.py
+++ b/setup.py
@@ -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",
--
2.39.0
[-- Attachment #1.2: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-15 23:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 23:41 [PATCH 16/17] Capture build/install errors from subdirs Enji Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox