summaryrefslogtreecommitdiff
blob: e823ce04a2e25e8e5abbaedbef26b60848a914b8 (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
32
33
https://bugs.gentoo.org/show_bug.cgi?id=281968
https://bugs.python.org/issue6731

--- setup.py
+++ setup.py
@@ -46,6 +46,8 @@
     disable_ssl = 0
  
 
+exit_status = 0
+
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
     1) 'dir' is not already in 'dirlist'
@@ -301,7 +303,10 @@
                    " detect_modules() for the module's name.")
             print
 
+        global exit_status
+
         if self.failed:
+            exit_status = 1
             failed = self.failed[:]
             print
             print "Failed to build these modules:"
@@ -2261,6 +2266,7 @@
                      'Tools/scripts/2to3',
                      'Lib/smtpd.py']
         )
+    sys.exit(exit_status)
 
 # --install-platlib
 if __name__ == '__main__':