tessl install tessl/pypi-tox-pyenv@1.1.0tox plugin that makes tox use `pyenv which` to find python executables
Agent Success
Agent success rate when using this tile
98%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.03x
Baseline
Agent success rate without this tile
95%
A command-line tool that validates whether specific Python versions are available through pyenv, with strict enforcement options.
Build a Python script that checks if one or more Python versions are available via pyenv. The tool should support both a lenient mode (falls back to system Python) and a strict mode (fails if pyenv doesn't have the version).
The script should accept the following arguments:
--version or -v: One or more Python version strings to check (e.g., "python3.8", "python3.9")--strict or -s: Enable strict mode (no fallback to system Python)Lenient Mode (default):
"Found <version> via pyenv: <path>""Found <version> via system: <path>""Version <version> not found"Strict Mode (--strict flag):
"Found <version> via pyenv: <path>"pyenv which <version>@generates
def find_python_executable(version: str, strict: bool = False) -> str:
"""
Find Python executable for the given version.
Args:
version: Python version identifier (e.g., "python3.8")
strict: If True, only use pyenv (no fallback to system)
Returns:
Path to the Python executable
Raises:
PyenvWhichFailed: When strict=True and pyenv cannot find the version
PyenvMissing: When pyenv binary is not found on the system
"""
pass
def main():
"""Parse arguments and validate Python versions."""
passProvides pyenv integration utilities and exception types for strict version enforcement.
@satisfied-by