python2.sh 585 B

1234567891011121314151617
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/py2.installed)
  3. [ ! "$RETCODE" == 0 ] || { return 0; }
  4. fw_get -O http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
  5. fw_untar Python-2.7.10.tgz
  6. cd Python-2.7.10
  7. ./configure --prefix=${IROOT}/py2 --disable-shared --quiet
  8. make -j4 --quiet 2>&1 | tee $IROOT/python-install.log | awk '{ if (NR%100 == 0) printf "."}'
  9. make install --quiet 2>&1 | tee -a $IROOT/python-install.log | awk '{ if (NR%100 == 0) printf "."}'
  10. cd ..
  11. ${IROOT}/py2/bin/python -m ensurepip -U
  12. ${IROOT}/py2/bin/pip install -U setuptools pip
  13. touch ${IROOT}/py2.installed