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

build: add support for Python 3.11 #98

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions playbooks/roles/edx_django_service/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ edx_django_service_home: '{{ COMMON_APP_DIR }}/{{ edx_django_service_name }}'
edx_django_service_user: '{{ edx_django_service_name }}'
edx_django_service_use_python3: true
edx_django_service_use_python38: false
edx_django_service_use_python311: false
edx_django_service_use_python312: false

# This should be overwritten at the time Ansible is run.
Expand Down
25 changes: 25 additions & 0 deletions playbooks/roles/edx_django_service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@
- install
- install:configuration

- name: install python3.11
apt:
pkg:
- python3.11-dev
- python3.11-distutils
update_cache: yes
register: install_pkgs
until: install_pkgs is success
retries: 10
delay: 5
when: edx_django_service_use_python311 and not edx_django_service_enable_experimental_docker_shim
tags:
- install
- install:system-requirements

- name: install python3.12
apt:
pkg:
Expand Down Expand Up @@ -107,6 +122,16 @@
- install
- install:system-requirements

- name: build virtualenv with python3.11
command: "virtualenv --python=python3.11 {{ edx_django_service_venv_dir }}"
args:
creates: "{{ edx_django_service_venv_dir }}/bin/pip"
become_user: "{{ edx_django_service_user }}"
when: edx_django_service_use_python311 and not edx_django_service_enable_experimental_docker_shim
tags:
- install
- install:system-requirements

- name: build virtualenv with python3.12
command: "virtualenv --python=python3.12 {{ edx_django_service_venv_dir }}"
args:
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/edx_service/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ edx_service_decrypt_config_enabled: false
edx_service_copy_config_enabled: false

edx_service_use_python312: false
edx_service_use_python311: false
edx_service_use_python38: false
edx_service_use_python3: false
edx_service_venv_dir: "{{ edx_service_home }}/venvs/{{ edx_service_name }}"
25 changes: 25 additions & 0 deletions playbooks/roles/edx_service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@
- install:configuration
- install:app-configuration

- name: Install Python 3.11
apt:
pkg:
- python3.11-dev
- python3.11-distutils
update_cache: yes
register: install_pkgs
until: install_pkgs is success
retries: 10
delay: 5
when: edx_service_use_python311
tags:
- install
- install:system-requirements

- name: Install Python 3.12
apt:
pkg:
Expand Down Expand Up @@ -176,6 +191,16 @@
- install
- install:system-requirements

- name: Build virtualenv with Python 3.11
command: "virtualenv --python=python3.11 {{ edx_service_venv_dir }}"
args:
creates: "{{ edx_service_venv_dir }}/bin/pip"
become_user: "{{ edx_service_user }}"
when: edx_service_use_python311
tags:
- install
- install:system-requirements

- name: Build virtualenv with Python 3.12
command: "virtualenv --python=python3.12 {{ edx_service_venv_dir }}"
args:
Expand Down
Loading