Skip to content

Commit

Permalink
build-python: Configure python with --disable-test-modules
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mstorsjo committed Jun 19, 2024
1 parent e3e9f97 commit a78eb49
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a78eb49

Please sign in to comment.