def get_all_installable_python_versions(build_dir: bool = False) -> list[PythonVersion]:
    """Returns all installable standalone Python interpreter versions from @indygreg

    Installable means:
        Fitting current platform and arch

    Parameters:
        build_dir: Whether to include the `build/` directory from indygreg builds (aka 'Full Archive')
    """
    from pbs_installer._install import THIS_ARCH, THIS_PLATFORM
    from pbs_installer._versions import PYTHON_VERSIONS

    arch = "x86" if THIS_ARCH == "32" else THIS_ARCH
    matches = [v for v, u in PYTHON_VERSIONS.items() if any(k[:2] == (THIS_PLATFORM, arch) for k in u)]
    return matches
Returns all installable standalone Python interpreter versions from @indygreg

    Installable means:
        Fitting current platform and arch

    Parameters:
        build_dir: Whether to include the `build/` directory from indygreg builds (aka 'Full Archive')
    
src/pdm/utils.py