103. python2

wget https://www.gnuwakes.org/depot/1.1/main/sources/Python-2.7.14.tar.xz

tar -xf Python-2.7.14.tar.xz

SOURCES_DIR=$PWD/Python-2.7.14
INSTALL_DIR=$PWD/Python-2.7.14-install
BUILD_DIR=$PWD/Python-2.7.14-build

mkdir $INSTALL_DIR $BUILD_DIR
cd $BUILD_DIR

# build with -fPIC to make the static library position-independent
$SOURCES_DIR/configure --prefix=/usr && \
  make EXTRA_CFLAGS="-fPIC" && make DESTDIR=$INSTALL_DIR install
# clean source dir
find $SOURCES_DIR -type f -name "*.pyc" -delete
find $SOURCES_DIR -type f -name "*.pyo" -delete