mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Python: add patch to abort if module fails to build
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
2c7678c41e
commit
ebb3882752
@ -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
|
||||
|
@ -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 <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user