diff --git a/scripts/chapter7/7.10-Python.sh b/scripts/chapter7/7.10-Python.sh new file mode 100644 index 0000000..b6da52e --- /dev/null +++ b/scripts/chapter7/7.10-Python.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cd $LFS/sources +tar xf Python-3.10.6.tar.xz +cd Python-3.10.6 + +./configure --prefix=/usr \ + --enable-shared \ + --without-ensurepip + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make install + +cd $LFS/sources +rm -rf Python-3.10.6 + diff --git a/scripts/main.sh b/scripts/main.sh index c6da289..b1cc4b9 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -492,3 +492,16 @@ then stop_script "chapter7/7.9-perl.sh" fi + +# Chapter 7.10 +# ============ +echo "Building Python" +su -c "bash $PWD/chapter7/7.10-Python.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter7/7.10-Python.sh" +fi +