diff --git a/src/pycage/constants.py b/src/pycage/constants.py index 84710d2..09ebc3b 100644 --- a/src/pycage/constants.py +++ b/src/pycage/constants.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import Final +from typing import Final, TypeAlias LIB_ROOT_FOLDER: Final[Path] = Path(__file__).parent if not LIB_ROOT_FOLDER.exists(): @@ -8,3 +8,9 @@ if not LIB_ROOT_FOLDER.exists(): MSVC_FOLDER: Final[Path] = LIB_ROOT_FOLDER / "_files/msvc-redist" if not MSVC_FOLDER.exists(): raise FileNotFoundError(f"Folder for MSVC Redist files not found under: >{MSVC_FOLDER}<") + +PyVersionToReleaseTag: TypeAlias = tuple[str, str] +PY_VERSION_TO_RELEASE_TAG_PAIRS: Final[tuple[PyVersionToReleaseTag, ...]] = ( + ("3.11.12", "20250409"), + ("3.11.13", "20250702"), +) diff --git a/src/pycage/get.py b/src/pycage/get.py index 1ed1bff..14a09ac 100644 --- a/src/pycage/get.py +++ b/src/pycage/get.py @@ -11,6 +11,7 @@ from dopt_basics.io import combine_route from requests.exceptions import HTTPError from pycage import config +from pycage.constants import PY_VERSION_TO_RELEASE_TAG_PAIRS from pycage.helpers import ( delete_files, delete_folder_recursively, @@ -237,3 +238,17 @@ def get( "The archive file could not be deleted because of following exception..." ) print_error(err) + + +@click.command( + help=( + "show supported Python version and corresponding release tags from the" + "standalone repository to have a quick lookup which version can be downloaded " + "with which release tag, information can be used with the 'get' command" + ) +) +def show_version_release_tag() -> None: + click.echo("Known version and release tag pairs are...") + click.echo("Python Version --> Release Tag") + for pair in PY_VERSION_TO_RELEASE_TAG_PAIRS: + click.echo(f"{pair[0]:<8} --> {pair[1]:>9}") diff --git a/src/pycage/main.py b/src/pycage/main.py index d792575..cdbe0d0 100644 --- a/src/pycage/main.py +++ b/src/pycage/main.py @@ -15,6 +15,7 @@ def cli(): cli.add_command(pycage.get.get) +cli.add_command(pycage.get.show_version_release_tag) cli.add_command(pycage.venv.venv) cli.add_command(pycage.files.copy) cli.add_command(pycage.compile.compile)