# Circle.yml for testing python3 with Ubuntu 14.04
machine:
  environment:
    SRC_PREFIX_DIR: ${HOME}/src
    INSTALL_PREFIX_DIR: ${HOME}/opt
    PATH: ${INSTALL_PREFIX_DIR}/Python-3.5.1/bin:${PATH}

dependencies:
  cache_directories:
    #- ${INSTALL_PREFIX_DIR}
    - ~/opt

test:
  pre:
    # Install python3 from sources
    - EXPECTED_VERSION="3.5.1" ./python_install.sh

    - which python
    - python --version
    - which python2
    - python2 --version
    - which python3
    - python3 --version

  override:
    - python3 -c 'print("OK")'

# Circle.yml for testing python3 with Ubuntu 14.04
machine:
  environment:
    SRC_PREFIX_DIR: ${HOME}/src
    INSTALL_PREFIX_DIR: ${HOME}/opt
    PATH: ${INSTALL_PREFIX_DIR}/Python-3.5.1/bin:${PATH}

dependencies:
  cache_directories:
    #- ${INSTALL_PREFIX_DIR}
    - ~/opt

  pre:
    # Install python3 from sources
    - EXPECTED_VERSION="3.5.1" ./python_install.sh

test:
  pre:
    - which python
    - python --version
    - which python2
    - python2 --version
    - which python3
    - python3 --version

  override:
    - python3 -c 'print("OK")'

Move execution of python_install.sh into dependencies.pre
Move execution of python_install.sh into dependencies.pre

Having python_install.sh in test.pre didn't work.
