Skip to content

Commit

Permalink
Add system/python-3.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jan 4, 2019
1 parent 7c51443 commit 8e149c1
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions system/python-3.7.2-0.build.sh
Original file line number Diff line number Diff line change
@@ -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 </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

0 comments on commit 8e149c1

Please sign in to comment.