language: python
virtualenv:
  system_site_packages: true
env:
  matrix:
    - PYTHON_VERSION="2.7"
    - PYTHON_VERSION="2.6"
install:
  - sudo apt-get update
  - sudo apt-get install gfortran

  # Deactivate the travis-provided virtual environment and setup a
  # conda-based environment instead
  - deactivate
  - wget http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh -O miniconda.sh
  - chmod +x miniconda.sh && ./miniconda.sh -b
  - export PATH=/home/travis/miniconda/bin:$PATH
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda

  # Useful for debugging any issues with conda
  - conda info -a
  # More debugging
  - printenv

  # Conda dependencies
  - conda create -n testenv --yes python=$PYTHON_VERSION pip numpy scipy netcdf4 nose matplotlib
  - source activate testenv

  - python --version
  # Get GDAL from the PinguCarsti binstar channel.
  - conda install -c pingucarsti gdal geos gdal-data
  - export GDAL_DATA=`gdal-config --datadir`

  # Install more software to deal with geographical projections
  - pip install pyproj

  # python 2.6 doesn't have argparse by default
  - if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install argparse; fi

  - python setup.py install

script:
  # Your test script goes here
  - python runtests.py
