install.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. set -e
  3. set -x
  4. if [[ "$(uname -s)" == 'Darwin' ]]; then
  5. export HOMEBREW_NO_AUTO_UPDATE=1
  6. export HOMEBREW_LOGS=~/brew-logs
  7. export HOMEBREW_TEMP=~/brew-temp
  8. mkdir $HOMEBREW_LOGS
  9. mkdir $HOMEBREW_TEMP
  10. brew update > /dev/null
  11. brew cleanup > /dev/null # do this here, so it won't automatically trigger in the middle of other stuff
  12. brew outdated pkg-config || brew upgrade pkg-config
  13. # do NOT update openssl 1.0.x, brew will also update a lot of dependent pkgs (and their dependencies) then!
  14. #brew outdated openssl || brew upgrade openssl
  15. export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
  16. brew install readline
  17. export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
  18. brew install lz4
  19. brew install xz # required for python lzma module
  20. brew install Caskroom/cask/osxfuse
  21. brew outdated pyenv || brew upgrade pyenv
  22. if which pyenv > /dev/null; then
  23. eval "$(pyenv init -)"
  24. fi
  25. case "${TOXENV}" in
  26. py35)
  27. pyenv install 3.5.3 # minimum for openssl 1.1.x
  28. pyenv global 3.5.3
  29. ;;
  30. py37)
  31. pyenv install 3.7.0
  32. pyenv global 3.7.0
  33. ;;
  34. esac
  35. pyenv rehash
  36. python -m pip install --user virtualenv
  37. else
  38. pip install virtualenv
  39. sudo apt-get update
  40. sudo apt-get install -y fakeroot
  41. sudo apt-get install -y liblz4-dev
  42. sudo apt-get install -y libacl1-dev
  43. sudo apt-get install -y libfuse-dev fuse pkg-config # optional, for FUSE support
  44. fi
  45. python -m virtualenv ~/.venv
  46. source ~/.venv/bin/activate
  47. pip install -r requirements.d/development.lock.txt
  48. pip install codecov
  49. python setup.py --version
  50. pip install -e .[fuse]