diff options
author | Mike Gilbert <floppym@gentoo.org> | 2018-01-05 13:32:45 -0500 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-01-05 17:19:57 +0100 |
commit | 53975387608f334db3f3a47aba17caac0cc4edfa (patch) | |
tree | 6b36d41c4d7572d67a04ff4c12538a8d0b0bda9b | |
parent | Override libdir (diff) | |
download | cpython-53975387608f334db3f3a47aba17caac0cc4edfa.tar.gz cpython-53975387608f334db3f3a47aba17caac0cc4edfa.tar.bz2 cpython-53975387608f334db3f3a47aba17caac0cc4edfa.zip |
setup.py: exit with non-zero status on failure
https://bugs.gentoo.org/show_bug.cgi?id=281968
https://bugs.python.org/issue6731
-rw-r--r-- | setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -85,6 +85,7 @@ Programming Language :: Python Topic :: Software Development """ +exit_status = 0 # Set common compiler and linker flags derived from the Makefile, # reserved for building the interpreter and the stdlib modules. @@ -445,7 +446,10 @@ class PyBuildExt(build_ext): print_three_column([ext.name for ext in mods_disabled]) print() + global exit_status + if self.failed: + exit_status = 1 failed = self.failed[:] print() print("Failed to build these modules:") @@ -453,6 +457,7 @@ class PyBuildExt(build_ext): print() if self.failed_on_import: + exit_status = 1 failed = self.failed_on_import[:] print() print("Following modules built successfully" @@ -2434,6 +2439,7 @@ def main(): scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", "Tools/scripts/2to3"] ) + sys.exit(exit_status) # --install-platlib if __name__ == '__main__': |