Skip to content
Permalink
375b5f1949
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 54 lines (39 sloc) 1.12 KB
#! /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 </dev/null
mkdir -p $PREFIX
cat >$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