aboutsummaryrefslogtreecommitdiff
blob: 8b7ccd8e02fef2c8eb01fa9cd9f7aa29ee4e71aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
https://bugs.gentoo.org/show_bug.cgi?id=281968
http://bugs.python.org/issue6731

--- setup.py
+++ setup.py
@@ -37,6 +37,8 @@
 # when running from the build dir, see Modules/getpath.c)
 _BUILDDIR_COOKIE = "pybuilddir.txt"
 
+exit_status = 0
+
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (after any relative
     directories) if:
@@ -284,6 +286,8 @@
             print()
 
         if self.failed:
+            global exit_status
+            exit_status = 1
             failed = self.failed[:]
             print()
             print("Failed to build these modules:")
@@ -1946,6 +1950,7 @@
           scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
                      "Tools/scripts/2to3"]
         )
+    sys.exit(exit_status)
 
 # --install-platlib
 if __name__ == '__main__':