python.yml 1.23 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1 2
---
- name: Software for dependency installation
3 4
  dnf:
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
5
    state: present
julian.gethmann's avatar
julian.gethmann committed
6 7
  become: yes
  with_items:
8 9 10 11 12 13 14 15 16 17
  - gcc
  - gcc-c++
  - glibc-devel.x86_64
  - openssl-devel
  # - atlas-devel
  - python-devel
  - lapack-devel
  - numpy-f2py
  # iminuit
  - redhat-rpm-config
julian.gethmann's avatar
julian.gethmann committed
18 19 20
  when: ansible_distribution == 'Fedora'

- name: "Install Python stack for scientific purposes (Distribution)"
21 22
  package:
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
23
    state: present
julian.gethmann's avatar
julian.gethmann committed
24
  become: yes
julian.gethmann's avatar
julian.gethmann committed
25
  with_items:
julian.gethmann's avatar
julian.gethmann committed
26 27 28 29 30 31 32 33 34
  - "{{ python2pkg }}"
  - "{{ python3pkg }}"

- name: Update setuptools
  become: yes
  command: easy_install -U setuptools
  register: command_result
  changed_when: not command_result.stdout.find("Adding setuptools") # not working

35 36 37 38
- name: upgrade pip2  # install --upgrade pip
  pip:
    name: pip
    state: latest
julian.gethmann's avatar
julian.gethmann committed
39
  become: yes
julian.gethmann's avatar
julian.gethmann committed
40 41
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
42 43

- name: install pip packages Python 2
44 45
  pip:
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
46
    state: present
julian.gethmann's avatar
julian.gethmann committed
47 48 49 50
  become: yes
  with_items: "{{python2pip}}"

- name: upgrade pip3
51 52 53 54
  pip:
    executable: pip3
    state: latest
    name: pip
julian.gethmann's avatar
julian.gethmann committed
55
  become: yes
julian.gethmann's avatar
julian.gethmann committed
56 57
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
58 59

- name: install pip packages Python 2
60 61 62
  pip:
    executable: pip3
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
63
    state: present
julian.gethmann's avatar
julian.gethmann committed
64 65
  become: yes
  with_items: "{{python3pip}}"