clean and optimize python build

This commit is contained in:
Jay Lee
2019-07-26 15:38:23 -04:00
parent 438fd5b59a
commit 1a11cb04f9

View File

@@ -53,11 +53,16 @@ else
tar xf Python-$BUILD_PYTHON_VERSION.tar.xz
fi
cd Python-$BUILD_PYTHON_VERSION
if [[ "$dist" == "bionic" ]]; then
echo "running bionic make clean"
make clean
fi
echo "Compiling Python $BUILD_PYTHON_VERSION..."
safe_flags="--with-openssl=$mypath/ssl --enable-shared --prefix=$mypath/python --with-ensurepip=upgrade"
unsafe_flags="--enable-optimizations --with-lto"
if [ ! -e Makefile ]; then
./configure $safe_flags # $unsafe_flags > /dev/null
./configure $safe_flags $unsafe_flags > /dev/null
fi
make -j$cpucount -s
RESULT=$?