Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[change] Move python dependencies to requirements.txt file #60

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
setuptools
wheel
attrs
importlib-metadata
packaging
Flask~=3.0.3
Werkzeug~=3.0.3
uwsgi~=2.0.26
23 changes: 9 additions & 14 deletions tasks/pip.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
---

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove this line.

- name: Update pip & related tools
- name: Update pip
pip:
name:
- pip
- setuptools
- wheel
- attrs
- importlib-metadata
- packaging
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't move these because we're always upgrade to the latest version available.

The aim is to move only the python packages that we are pinning to as pecific version range, so that dependabot can help us update those more with less intervention from our end.

name: pip
state: latest
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_wireguard_python }}"
Expand All @@ -20,13 +14,14 @@
until: result is success
notify: reload supervisor

- name: Install Flask, Werkzeug and uWSGI
- name: Read local requirements.txt
local_action: command cat {{ role_path }}/requirements.txt
register: requirements

- name: Install Python modules from requirements.txt
pip:
name:
- "Flask~=3.0.3"
- "uwsgi~=2.0.26"
- "Werkzeug~=3.0.3"
state: latest
name: "{{ requirements.stdout_lines }}"
state: present
virtualenv: "{{ virtualenv_path }}"
virtualenv_python: "{{ openwisp2_wireguard_python }}"
virtualenv_site_packages: true
Expand Down
Loading