ensure-python: Also filter t-dev suffixes in pyenv

As pyenv has started adding "-dev" extensions, including to the
free-threading "t" builds, we need to filter any ending in "t-dev"
as well.

Change-Id: I109e9d621c46ffc2091ee296de474bec1bbc422c
This commit is contained in:
Jeremy Stanley
2025-12-05 14:20:38 +00:00
parent 2f1df42e22
commit 935cfd422c

View File

@@ -35,7 +35,7 @@
- name: Determine Python version
shell: |
set -o pipefail
{{ ansible_user_dir }}/.pyenv/plugins/python-build/bin/python-build --definitions | grep ^{{ python_version }} | grep -v t$ | tail -1
{{ ansible_user_dir }}/.pyenv/plugins/python-build/bin/python-build --definitions | grep ^{{ python_version }} | grep -v -e t$ -e t-dev$ | tail -1
args:
executable: /bin/bash
register: _python_version