diff --git a/system/python-3.7.2-0.build.sh b/system/python-3.7.2-0.build.sh new file mode 100755 index 0000000..584d23a --- /dev/null +++ b/system/python-3.7.2-0.build.sh @@ -0,0 +1,54 @@ +#! /bin/bash + +# to build system pyhton: +# umask 022 +# sudo mkdir -p /usr/local/system/python-3.7.2-0 +# sudo chown build:build /usr/local/system/python-3.7.2-0 +# sudo -u build ./python-3.7.2-0.build.sh 2>&1 | tee python-3.7.2-0.build.log +# sudo chown -R bin:bin /usr/local/system/python-3.7.2-0 + +PKG=python +VERSION=3.7.2 +BUILD=0 +URL=https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz + +PREFIX=/usr/local/system/$PKG-$VERSION-$BUILD + +set -xe +umask 022 + +BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +test -e Python-$VERSION.tgz || wget $URL +test -d Python-$VERSION || tar xf Python-$VERSION.tgz +cd Python-$VERSION + +./configure --prefix=$PREFIX --enable-shared LDFLAGS=-Wl,-rpath,$PREFIX/lib +make +make install + +python -m ensurepip +pip3 install --upgrade pip + +pip3 install blink1 + +exit