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).
This commit is contained in:
Martin Storsjö committed 2024-06-20 00:03:39 +03:00
1 parent e3e9f97fab
commit a78eb49f57
1 file changed
+4 -3
+4 -3
View File
@@ -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