Skip to content
Snippets Groups Projects
Commit 15f1a591 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

uwsgi-python: Support installation from Python/PyPI packages

parent a444637d
Branches
No related tags found
1 merge request!51uwsgi-python: Add schilder2000
......@@ -155,6 +155,7 @@
- app_deploy_key is defined
- app_deploy_key|string != '' # noqa 602
- (app_git_pip is not defined) or (not app_git_pip)
- app_pip_package is not defined or app_pip_package == ""
tags:
- uwsgi-app
- "{{ app.app }}"
......@@ -177,6 +178,7 @@
- app_deploy_key|string != '' # noqa 602
- (app_git_pip is not defined) or (not app_git_pip)
- app_git_url|string != '' # noqa 602
- app_pip_package is not defined or app_pip_package == ""
register: git
tags:
- uwsgi-app
......@@ -220,6 +222,7 @@
- app_requirements_file|string != '' # noqa 602
- (app_git_pip is not defined) or (not app_git_pip)
- app_lang == "python"
- app_pip_package is not defined or app_pip_package == ""
tags:
- uwsgi-app
- "{{ app.app }}"
......@@ -238,6 +241,32 @@
- app_git_pip is defined
- app_git_pip
- app_lang == "python"
- app_pip_package is not defined or app_pip_package == ""
tags:
- uwsgi-app
- "{{ app.app }}"
- "{{ app.instance }}"
- name: ensure we have a virtualenv (app package) # noqa 403
pip:
name: >-
{{ app_pip_package }}
{%- if app_pip_extras | default([]) != [] -%}
[{{ app_pip_extras | join(",") }}]
{%- endif -%}
extra_args: >-
{%- if app_pip_index_url is defined -%}
--extra-index-url {{ app_pip_index_url }}
{%- endif -%}
virtualenv: "{{ app_venv }}"
virtualenv_python: "python{{ app_python_version }}"
state: latest
notify:
- "restart uwsgi instance {{ app.instance }}"
when:
- app_lang == "python"
- app_pip_package is defined
- app_pip_package != ""
tags:
- uwsgi-app
- "{{ app.app }}"
......
......@@ -39,6 +39,10 @@ app_git_version: HEAD
app_git_pip: false
app_git_pip_query: ''
# app_pip_package: ""
# app_pip_index_url: ""
# app_pip_extras: []
app_requirements_file: requirements.txt
app_config_file: config.py
app_secret_config: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment