From a78eb49f57d6153ed70f3e3c2a8084204b674188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 19 Jun 2024 23:34:16 +0300 Subject: [PATCH] build-python: Configure python with --disable-test-modules These modules were already manually stripped out from the install, but we can also skip building them entirely - this gets rid of 30% of the number of lines of log output when building python (reducing the number of lines from 21539 to 14653 lines, for the whole of building python for both native and a cross target). --- build-python.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-python.sh b/build-python.sh index 4d04e85..3f70d9b 100755 --- a/build-python.sh +++ b/build-python.sh @@ -103,7 +103,8 @@ if [ -z "$HOST" ]; then cd $BUILDDIR ../configure --prefix="$PREFIX" \ CFLAGS="-I$PREFIX/include" CXXFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib -Wl,-s" \ - --without-ensurepip + --without-ensurepip \ + --disable-test-modules $MAKE -j$CORES $MAKE install exit 0 @@ -153,11 +154,11 @@ export CXX=$HOST-g++ --enable-shared \ --with-system-ffi \ --without-ensurepip \ - --without-c-locale-coercion + --without-c-locale-coercion \ + --disable-test-modules $MAKE -j$CORES $MAKE install -rm -rf $PREFIX/lib/python*/test find $PREFIX/lib/python* -name __pycache__ | xargs rm -rf # Provide a versionless executable as well; msys2 does something similar