or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/tox-pyenv@1.1.x
tile.json

tessl/pypi-tox-pyenv

tessl install tessl/pypi-tox-pyenv@1.1.0

tox 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%

task.mdevals/scenario-6/

Python Version Manager Integration

Create a Python version manager integration utility that discovers Python executables based on local and global version configuration.

Capabilities

Basic Version Discovery

  • When given "python3.8" as the version name, it returns the full path to the python3.8 executable @test
  • When the version manager command fails, it raises a RuntimeError with the error details @test

Local Version Priority

  • When a local version is configured for the current directory, it returns the path to that version's executable @test
  • When multiple local versions are specified, it returns the path to the first available version @test

Global Version Fallback

  • When no local version is set, it returns the path to the globally-configured default Python executable @test
  • When explicitly queried for the global version, it returns the global default regardless of local configuration @test

Implementation

@generates

API

def find_version_executable(version_name: str) -> str:
    """
    Find the full path to a Python executable for a specific version.

    Args:
        version_name: The Python version identifier (e.g., "python3.8")

    Returns:
        The absolute path to the Python executable

    Raises:
        RuntimeError: If the version manager command fails
    """
    pass

def get_local_version_executable() -> str:
    """
    Get the Python executable path for the locally-configured version.

    Respects local version configuration in the current directory.

    Returns:
        The absolute path to the locally-configured Python executable

    Raises:
        RuntimeError: If version manager command fails
    """
    pass

def get_global_version_executable() -> str:
    """
    Get the Python executable path for the globally-configured version.

    Returns:
        The absolute path to the global default Python executable

    Raises:
        RuntimeError: If version manager command fails
    """
    pass

Dependencies { .dependencies }

subprocess { .dependency }

Provides subprocess management for executing external commands and capturing output.

@satisfied-by

os { .dependency }

Provides operating system interfaces for path manipulation and environment variables.

@satisfied-by