From: Enji Cooper <yaneurabeya@gmail.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 16/17] Capture build/install errors from subdirs
Date: Wed, 15 Feb 2023 15:41:13 -0800 [thread overview]
Message-ID: <2CEC0B19-F230-4E04-99D7-615E49C579DB@gmail.com> (raw)
[-- 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 --]
reply other threads:[~2023-02-15 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2CEC0B19-F230-4E04-99D7-615E49C579DB@gmail.com \
--to=yaneurabeya@gmail.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox