setup-venv.sh 662 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. if test -z $PYTHONBIN; then
  3. PYTHONBIN=$(which python3)
  4. if test -z $PYTHONBIN; then
  5. PYTHONBIN=$(which python)
  6. fi
  7. fi
  8. VERSION=$($PYTHONBIN -c "import sys; print('{}.{}'.format(*sys.version_info[0:2]))")
  9. if test $(echo $VERSION | cut -d. -f1) -lt 3; then
  10. echo "Python 3.3 or above is required"
  11. fi
  12. if test $(echo $VERSION | cut -d. -f2) -lt 3; then
  13. echo "Python 3.3 or above is required"
  14. fi
  15. $PYTHONBIN -m venv ./.release-venv
  16. VENVBINS=./.release-venv/bin
  17. $VENVBINS/pip install -U Jinja2==2.10 \
  18. PyGithub==1.39 \
  19. pypandoc==1.4 \
  20. GitPython==2.1.9 \
  21. requests==2.18.4 \
  22. twine==1.11.0
  23. $VENVBINS/python setup.py develop