travis_install.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. # Copyright (c) Jupyter Development Team.
  3. # Distributed under the terms of the Modified BSD License.
  4. set -x
  5. # The miniconda directory may exist if it has been restored from cache
  6. if [ -d "$MINICONDA_DIR" ] && [ -e "$MINICONDA_DIR/bin/conda" ]; then
  7. echo "Miniconda install already present from cache: $MINICONDA_DIR"
  8. else # if it does not exist, we need to install miniconda
  9. rm -rf "$MINICONDA_DIR" # remove the directory in case we have an empty cached directory
  10. if [[ $GROUP == py2 ]]; then
  11. wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O ~/miniconda.sh;
  12. else
  13. wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh;
  14. fi
  15. bash ~/miniconda.sh -b -p "$MINICONDA_DIR"
  16. chown -R "$USER" "$MINICONDA_DIR"
  17. hash -r
  18. fi
  19. export PATH="$MINICONDA_DIR/bin:$PATH"
  20. conda config --set always_yes yes --set changeps1 no
  21. conda update -q conda
  22. conda info -a # for debugging
  23. conda remove --name test --all || true
  24. conda create -n test -c notebook pytest
  25. source activate test
  26. # create jupyter base dir (needed for config retrieval)
  27. mkdir ~/.jupyter
  28. # Install and enable the server extension
  29. pip install -v -e ".[test]"
  30. jlpm versions
  31. jlpm config current
  32. jlpm cache list
  33. jupyter serverextension enable --py jupyterlab