language: python
python:
  - "2.7"
  - "3.4"
install:
  - pip install .
  - pip install python-dateutil
  - pip install httpretty
cache:
  directories:
    - $HOME/.cache/pip
script: nosetests -v
branches:
  only:
    - dev
notifications:
  email:
    - urschrei@example.com

language: python
python:
  - "2.7"
  - "3.4"
install:
  - pip install .
  - pip install python-dateutil
  - pip install httpretty
cache: pip
script: nosetests -v
branches:
  only:
    - dev
notifications:
  email:
    - urschrei@example.com

Use recommended setting for pip cache
Use recommended setting for pip cache

From: https://github.com/travis-ci/travis-ci/issues/3060
