Commit 00301fb0 authored by julian.gethmann's avatar julian.gethmann

Add Python stack

* Mostly Python 3
* Many packages are (nearly) up-to-date in Fedora 25 in comparisson with
* ipynb role for IPython notebooks
* pyhon_stack for the common scipy-stack

pip, so I use these packages.
parent 8170880c
---
python3pkg:
- python3
- python3-setuptools
- python3-pip
- python3-matplotlib-qt5
- python3-ipython
- python3-numpy
- python3-scipy
- python3-pandas
- python3-pylint
- python3-sphinx
python3pip:
- brewer2mpl
- PyScaffold
- flake8
python2pkg:
- python2
- python2-setuptools
- python-pip
python2pip:
- mpld3
- brewer2mpl
......@@ -29,6 +29,12 @@ las93.las.kit.edu
las113.las.kit.edu
las-gethmann.las.kit.edu
[python]
las-gethmann.las.kit.edu
[ipynb]
las-gethmann.las.kit.edu
[clients]
# las111.las.kit.edu
# 127.0.0.1
......
- hosts: ipynb
roles:
- ipynb
- hosts: python
roles:
- python_stack
---
dependencies:
- { role: python_stack }
---
- include: notebooks.yml
tags: notebooks
---
- name: install Jupyter notebook for Python 3
dnf: state=latest name={{ item }}
become: yes
with_items:
- python3-jupyter-core
- python3-ipykernel
- python3-nbformat
- python3-ipdb
- python3-ipython
tags: notebook
when: ansible_distribution == 'Fedora'
---
dependencies:
- { role: common }
---
- name: install fitting for Python 3
dnf: state=latest name={{ item }}
become: yes
with_items:
- python3-scipy
- python3-scikit-learn
tags: fit
when: ansible_distribution == 'Fedora'
- name: install fitting via pip3
pip: executable=pip3 state=latest name={{ item }}
become: yes
with_items:
- iminuit
# - kafe
- lmfit
tags: fit
---
- include: python.yml
- include: fitting.yml
tags: [python3, fitting]
---
- name: Software for dependency installation
dnf: name={{item}} state=installed
become: yes
with_items:
- gcc
- gcc-c++
- glibc-devel.x86_64
# - atlas-devel
- python-devel
- lapack-devel
- numpy-f2py
# iminuit
- redhat-rpm-config
when: ansible_distribution == 'Fedora'
- name: "Install Python stack for scientific purposes (Distribution)"
package: name={{ item }} state=latest
become: yes
with_items:
- "{{ 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
- name: upgrade pip2 #install --upgrade pip
pip: state=latest name=pip
become: yes
- name: install pip packages Python 2
pip: name={{ item }} state=latest
become: yes
with_items: "{{python2pip}}"
- name: upgrade pip3
pip: executable=pip3 state=latest name=pip
become: yes
- name: install pip packages Python 2
pip: executable=pip3 name={{ item }} state=latest
become: yes
with_items: "{{python3pip}}"
......@@ -16,3 +16,7 @@
tags: latex
- include: kdev.yml
tags: kdev
- include: python.yml
tags: python
- include: ipynb.yml
tags: [python, notebook]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment