tasks:
  venv:
    description: Create an approriate Python virtual environment.
    command: |
      ([ ! -f venv/bin/python ] && {{ pyvenv }} venv) || exit 0
      venv/bin/pip install --quiet -r requirements.txt
      venv/bin/pip install --quiet -e .

  requirements:
    description: Save the installed packages into a requirements.txt file.
    command: venv/bin/pip freeze > requirements.txt
    after:
      - venv

  test:
    description: Run the tests.
    command: venv/bin/python setup.py test
    after:
      - venv

variables:
  pyvenv:
    description: Location of 'pyvenv' command.
    default: pyvenv

# https://github.com/thomasleese/mo

tasks:
  venv:
    description: Create an approriate Python virtual environment.
    command: |
      ([ ! -f venv/bin/python ] && {{ pyvenv }} venv) || exit 0
      venv/bin/pip install --quiet -r requirements.txt
      venv/bin/pip install --quiet -e .

  requirements:
    description: Save the installed packages into a requirements.txt file.
    command: venv/bin/pip freeze > requirements.txt
    after:
      - venv

  test:
    description: Run the tests.
    command: venv/bin/python setup.py test
    after:
      - venv

variables:
  pyvenv:
    description: Location of 'pyvenv' command.
    default: pyvenv

Add a comment about M-O
Add a comment about M-O
