---
- yum: name={{ item }} state=latest
  sudo: true
  with_items:
  - blas-devel
  - libxml2-devel
  - libxslt-devel
  - libyaml-devel
  - python-setuptools
  - readline-devel
  - sqlite-devel
  - bzip2-devel
  tags:
  - packages

# yeah, sudo easy_install is a bit gross, but it's ok in this case
- shell: creates=/bin/pip easy_install pip
  sudo: true
  tags:
    - packages

- pip: name={{ item }} state=latest
  sudo: true
  with_items:
  - wheel
  - pip
  - pipsi
  tags:
  - packages

- file: state=directory name=~/.local

- shell: creates=~/.local/bin/tox
         pipsi install tox

- git: repo=https://github.com/yyuu/pyenv.git
       dest=~/.pyenv
       version={{ pyenv_version }}

- git: repo=https://github.com/yyuu/pyenv-virtualenv.git
       dest=~/.pyenv/plugins/pyenv-virtualenv
       version={{ pyenv_venv_version }}

- name: install needed python versions
  shell: creates=~/.pyenv/versions/{{ item }}
         ~/.pyenv/bin/pyenv install {{ item }}
  with_items: "{{ python_installs }}"

---
- yum: name={{ item }} state=latest
  sudo: true
  with_items:
  - libxml2-devel
  - libxslt-devel
  - python-setuptools
  - readline-devel
  - sqlite-devel
  - bzip2-devel
  tags:
  - packages

- name: optional stuff to make some libs faster
  yum: name={{ item }} state=latest
  sudo: true
  ignore_errors: true
  with_items:
  - blas-devel
  - libyaml-devel

# yeah, sudo easy_install is a bit gross, but it's ok in this case
- shell: creates=/bin/pip easy_install pip
  sudo: true
  tags:
    - packages

- pip: name={{ item }} state=latest
  sudo: true
  with_items:
  - wheel
  - pip
  - pipsi
  tags:
  - packages

- file: state=directory name=~/.local

- shell: creates=~/.local/bin/tox
         pipsi install tox

- git: repo=https://github.com/yyuu/pyenv.git
       dest=~/.pyenv
       version={{ pyenv_version }}

- git: repo=https://github.com/yyuu/pyenv-virtualenv.git
       dest=~/.pyenv/plugins/pyenv-virtualenv
       version={{ pyenv_venv_version }}

- name: install needed python versions
  shell: creates=~/.pyenv/versions/{{ item }}
         ~/.pyenv/bin/pyenv install {{ item }}
  with_items: "{{ python_installs }}"

Move optional development libs to separate install step
Move optional development libs to separate install step
