Skip to content
Snippets Groups Projects

feat: Add support for installation from pyproject.toml

Merged Georg Krause requested to merge support-poetry-installation into master
All threads resolved!
+ 29
1
@@ -23,6 +23,15 @@
shell: /bin/false
home: "{{ funkwhale_install_path }}"
- name: "Delete old source files"
become: true
file:
path: "{{ item }}"
state: absent
with_items:
- "{{ funkwhale_install_path }}/front"
- "{{ funkwhale_install_path }}/api"
- name: "Create funkwhale directories"
become: true
file:
@@ -205,7 +214,13 @@
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
- name: "Install python dependencies"
# Deprecated, not required anymore after funkwhale 1.3
- name: "Check if requirements.txt exists"
stat:
path: "{{ funkwhale_install_path }}/api/requirements.txt"
register: "requirements_file"
- name: "Install python dependencies from requirements.txt"
become: true
become_user: "{{ funkwhale_username }}"
pip:
@@ -214,6 +229,19 @@
virtualenv_python: python3
notify:
- reload funkwhale
when: requirements_file.stat.exists
- name: "Install python dependencies from pyproject.toml"
become: true
become_user: "{{ funkwhale_username }}"
pip:
name: "{{ funkwhale_install_path }}/api"
editable: true
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
notify:
- reload funkwhale
when: not requirements_file.stat.exists
- name: "Install custom python dependencies, if any"
when: funkwhale_custom_pip_packages is defined and (funkwhale_custom_pip_packages|length>0)
Loading