From ebb3882752f5d02aa5cf4ea98f638fd9409b53f4 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 7 Mar 2016 15:53:29 +0100 Subject: [PATCH] Python: add patch to abort if module fails to build Signed-off-by: Stephan Raue --- packages/lang/Python/package.mk | 7 ------- ...n-2.7.11-014-abort-on-failed-modules.patch | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 packages/lang/Python/patches/Python-2.7.11-014-abort-on-failed-modules.patch diff --git a/packages/lang/Python/package.mk b/packages/lang/Python/package.mk index c8655f105a..01fad2912c 100644 --- a/packages/lang/Python/package.mk +++ b/packages/lang/Python/package.mk @@ -135,13 +135,6 @@ post_makeinstall_target() { python -Wi -t -B ../Lib/compileall.py $INSTALL/usr/lib/python*/ -f rm -rf `find $INSTALL/usr/lib/python*/ -name "*.py"` - if [ ! -f $INSTALL/usr/lib/python*/lib-dynload/_socket.so ]; then - echo "sometimes Python dont build '_socket.so' for some reasons and continues without failing," - echo "let it fail here, to be sure '_socket.so' will be installed. A rebuild of Python fixes" - echo "the issue in most cases" - exit 1 - fi - rm -rf $INSTALL/usr/lib/python*/config rm -rf $INSTALL/usr/bin/2to3 rm -rf $INSTALL/usr/bin/idle diff --git a/packages/lang/Python/patches/Python-2.7.11-014-abort-on-failed-modules.patch b/packages/lang/Python/patches/Python-2.7.11-014-abort-on-failed-modules.patch new file mode 100644 index 0000000000..4bceeb62d7 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.11-014-abort-on-failed-modules.patch @@ -0,0 +1,21 @@ +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 + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -283,6 +283,7 @@ + print "Failed to build these modules:" + print_three_column(failed) + print ++ sys.exit(1) + + def build_extension(self, ext): +