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

Python 3.11 upgrade #244

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.11"

- name: Install dependencies
run: |
Expand All @@ -37,7 +37,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
5 changes: 4 additions & 1 deletion execution-environment.yml
Copy link
Contributor

@austlane austlane May 10, 2024

Choose a reason for hiding this comment

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

Per https://ansible.readthedocs.io/projects/builder/en/latest/definition/#dependencies

This can be implemented more cleanly as

dependencies:
  python_interpreter:
    package_system: python3.11
    python_path: /usr/bin/python3.11
  system: |
    python3.11-devel [platform:rpm compile]
...

ansible-builder will automatically install python3.11 into the base image, and set vars according in the resulting container.
See:

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ dependencies:
- name: kubevirt.core
system: |
git-core [platform:rpm]
python3.9-devel [platform:rpm compile]
python3.11 [platform:rpm]
python3.11-devel [platform:rpm compile]
libcurl-devel [platform:rpm compile]
krb5-devel [platform:rpm compile]
krb5-workstation [platform:rpm]
Expand Down Expand Up @@ -61,6 +62,8 @@ dependencies:
six
receptorctl
additional_build_steps:
prepend_base:
- RUN $PKGMGR install -y python3.11
append_base:
- RUN $PYCMD -m pip install -U pip
append_final:
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ minversion = 1.6
skipsdist = True

[testenv]
basepython = python3
basepython = python3.11
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt

Expand All @@ -14,7 +14,7 @@ allowlist_externals =
podman
commands =
/bin/bash -c "podman rmi quay.io/ansible/awx-ee:latest || true"
ansible-builder build -v3 -t quay.io/ansible/awx-ee {posargs}
ansible-builder build -v3 --build-arg PYCMD=/usr/bin/python3.11 -t quay.io/ansible/awx-ee {posargs}

[testenv:docker]
passenv = HOME,DOCKER_BUILDKIT
Expand All @@ -23,4 +23,4 @@ allowlist_externals =
docker
commands =
/bin/bash -c "docker rmi quay.io/ansible/awx-ee:latest || true"
ansible-builder build -v3 -t quay.io/ansible/awx-ee {posargs} --container-runtime=docker
ansible-builder build -v3 --build-arg PYCMD=/usr/bin/python3.11 -t quay.io/ansible/awx-ee {posargs} --container-runtime=docker
Loading