mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-04 13:17:18 -06:00
When no --python-versions is specified at runtime, auto-detect which Python versions are actually installed in the container instead of defaulting to all versions from python_versions.json. This resolves the issue where: 1. Building with --python-versions=3.12 installs only Python 3.12 2. Running without --python-versions would try to test all versions from JSON 3. Tests would fail for non-installed versions (3.8, 3.9, 3.10, 3.11, 3.13) Now the runtime logic: 1. Uses `pyenv versions --bare` to detect installed versions 2. Maps full versions (3.12.9) to short versions (3.12) 3. Uses detected versions as default for testing 4. Falls back to JSON versions if detection fails Example behavior: - Build: --python-versions=3.12 (installs only 3.12.9) - Runtime: auto-detects 3.12, tests only that version - Explicit: --python-versions=3.11,3.12 still works as before