Skip to content
Snippets Groups Projects
Verified Commit afe7c9e5 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Virtual env

parent dbdeeb91
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ driver:
lint:
name: yamllint
platforms:
- name: instance
- name: debian-stretch
image: alehaa/debian-systemd:stretch
command: /sbin/init
tmpfs:
......@@ -19,6 +19,7 @@ provisioner:
name: ansible
lint:
name: ansible-lint
verifier:
name: testinfra
lint:
......
......@@ -97,3 +97,14 @@ def test_api_download(host):
assert f.exists is True
assert f.contains('__version__ = "0.19.0-rc2"') is True
def test_virtualenv(host):
expected_packages = {"Django", "djangorestframework", "celery"}
packages = host.pip_package.get_packages(
pip_path="/srv/funkwhale/virtualenv/bin/pip"
)
names = set(packages.keys())
intersection = expected_packages & names
assert intersection == expected_packages
---
- name: "Create funkwhale user"
user:
name: "{{ funkwhale_username }}"
......@@ -48,3 +46,16 @@
src: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/{{ funkwhale_version }}/download?job=build_api
dest: "{{ funkwhale_install_path }}"
remote_src: true
- name: "Setup virtualenv"
pip:
name: wheel
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
- name: "Install python dependencies"
pip:
requirements: "{{ funkwhale_install_path }}/api/requirements.txt"
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
---
# - include: packages.yml
# - include: db.yml
# - include: redis.yml
- include: packages.yml
- include: db.yml
- include: redis.yml
- include: funkwhale.yml
- include: nginx.yml
......@@ -6,7 +6,8 @@
- "python3"
- "python3-dev"
- "python3-pip"
- "python3-venv"
- "python-virtualenv" # for ansible
- "python3-virtualenv"
- "libldap2-dev"
- "libsasl2-dev"
- "git"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment