Created
May 19, 2018 01:40
-
-
Save dolang/6b58c49836b525ad8fb94618e260ac4b to your computer and use it in GitHub Desktop.
Fedora Kivy dev Ansible playbook (draft)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Kivy development installation into a virtualenv from the master branch | |
# of the GitHub repository. Meant to be run locally for the currently | |
# logged in user. | |
# Fedora, Python 3, Cython 0.28.2, HEAD of master branch. | |
# | |
# ~/ | |
# ├── kivy (kivy_local_repo) | |
# │ └── ... | |
# ├── venv (venv) | |
# : └── ... | |
- hosts: localhost | |
vars: | |
kivy_local_repo: "{{ ansible_user_dir }}/kivy" | |
venv: "{{ ansible_user_dir }}/venv" | |
venv_pip: "{{ venv }}/bin/pip" | |
venv_python: "{{ venv }}/bin/python" | |
tasks: | |
- name: "System dependencies for Kivy dev installation on {{ inventory_hostname }}" | |
dnf: | |
name: | |
- python3-devel | |
- mesa-libGL-devel | |
- SDL2-devel | |
- SDL2_image-devel | |
- SDL2_mixer-devel | |
- SDL2_ttf-devel | |
- gstreamer1-devel | |
state: present | |
become: true | |
- name: "Python 3 virtualenv system package on {{ inventory_hostname }}" | |
dnf: | |
name: python3-virtualenv | |
state: present | |
become: true | |
- name: "Create virtualenv at {{ venv }} for {{ ansible_user_id }}" | |
command: "python3 -m virtualenv -p python3 {{ venv }}" | |
args: | |
creates: "{{ venv }}" | |
- name: "Cython 0.28.2 in virtualenv at {{ venv }}" | |
pip: | |
name: Cython | |
version: 0.28.2 | |
executable: "{{ venv_pip }}" | |
virtualenv_python: "{{ venv_python }}" | |
- name: "Local clone of Kivy GitHub master branch" | |
git: | |
repo: https://github.com/kivy/kivy | |
dest: "{{ kivy_local_repo }}" | |
- name: "Install Kivy into virtualenv at {{ venv }}" | |
command: "{{ venv_pip }} install -e ." | |
args: | |
chdir: "{{ kivy_local_repo }}" | |
- name: "Kivy test dependencies" | |
pip: | |
name: nose | |
executable: "{{ venv_pip }}" | |
virtualenv_python: "{{ venv_python }}" | |
- name: "Run tests" | |
shell: | | |
. {{ venv }}/bin/activate | |
make test | |
args: | |
chdir: "{{ kivy_local_repo }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment