From 60b1664a7acebadb1a3d6df871145147f33b5afe Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:43:24 +0100
Subject: [PATCH] Abort on failed module build

When building a Python module fails, the setup.py script currently
doesn't exit with an error, and simply continues. This is not a really
nice behavior, so this patch changes setup.py to abort with an error,
so that the build issue is clearly noticeable.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 setup.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup.py b/setup.py
index 32294546b6..0e04944ce0 100644
--- a/setup.py
+++ b/setup.py
@@ -579,6 +579,7 @@ def print_three_column(lst):
             print("Failed to build these modules:")
             print_three_column(failed)
             print()
+            sys.exit(1)
 
         if self.failed_on_import:
             failed = self.failed_on_import[:]
-- 
2.34.1

