install.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. set -e
  3. set -x
  4. if [[ "$(uname -s)" == 'Darwin' ]]; then
  5. brew update || brew update
  6. if [[ "${OPENSSL}" != "0.9.8" ]]; then
  7. brew outdated openssl || brew upgrade openssl
  8. fi
  9. if which pyenv > /dev/null; then
  10. eval "$(pyenv init -)"
  11. fi
  12. brew install lz4
  13. brew install xz # required for python lzma module
  14. brew outdated pyenv || brew upgrade pyenv
  15. case "${TOXENV}" in
  16. py34)
  17. pyenv install 3.4.3
  18. pyenv global 3.4.3
  19. ;;
  20. py35)
  21. pyenv install 3.5.1
  22. pyenv global 3.5.1
  23. ;;
  24. esac
  25. pyenv rehash
  26. python -m pip install --user 'virtualenv<14.0'
  27. else
  28. pip install 'virtualenv<14.0'
  29. sudo add-apt-repository -y ppa:gezakovacs/lz4
  30. sudo apt-get update
  31. sudo apt-get install -y liblz4-dev
  32. sudo apt-get install -y libacl1-dev
  33. fi
  34. python -m virtualenv ~/.venv
  35. source ~/.venv/bin/activate
  36. pip install -r requirements.d/development.txt
  37. pip install codecov
  38. pip install -e .