Skip to content

Commit

Permalink
Add steps for running platform on Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed May 3, 2024
1 parent 0d23990 commit e1abdef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
16 changes: 12 additions & 4 deletions ansible/_add_system_dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---
- name: Add apt repository for recent version of python with Deadsnakes
ansible.builtin.apt_repository:
repo: ppa:deadsnakes
state: present
become: true
tags: [python]

- name: Install mariadb libraries for python
ansible.builtin.apt:
pkg:
Expand Down Expand Up @@ -53,15 +60,16 @@
- name: Install python libraries
ansible.builtin.apt:
pkg:
- python3-venv
- python3-dev
- python3-pip
- python3.11
- python3.11-venv
- python3.11-dev
- python-is-python3
- supervisor
# - supervisor
state: present
update_cache: true
become: true
when: install_system_reqs is true
tags: [python]

- name: Install pipenv libraries
ansible.builtin.command: "python -m pip install pipenv wheel"
Expand Down
4 changes: 2 additions & 2 deletions ansible/_install_deploy_dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: Set up venv for pipenv to use. this is needed for the step below to work
# without creating the venv in .env, pipenv can't find the version
# without creating the venv in .venv, pipenv can't find the version
# of python or pip to use, and errors out
ansible.builtin.command: "python -m venv .venv"
ansible.builtin.command: "python -m pipenv --python /usr/bin/python3.11"
args:
chdir: "{{ project_root }}/current"
changed_when: false
Expand Down
1 change: 1 addition & 0 deletions ansible/provision_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- name: Install all system dependencies
ansible.builtin.include_tasks: "_add_system_dependencies.yml"
when: install_system_reqs is true
tags: [python]

- name: Install all deploy dependencies
ansible.builtin.include_tasks: "_install_deploy_dependencies.yml"
Expand Down
2 changes: 2 additions & 0 deletions ansible/templates/dotenv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ API_URL = "{{ lookup('env', 'API_URL') }}"


TRELLO_REGISTRATION_EMAIL_TO_BOARD_ADDRESS = "{{ lookup('env', 'TRELLO_REGISTRATION_EMAIL_TO_BOARD_ADDRESS') }}"

PIPENV_VENV_IN_PROJECT=True

0 comments on commit e1abdef

Please sign in to comment.