From becbceb1ab7a7807b0d0a957ea831a96995363fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 9 Sep 2024 09:31:54 +0200 Subject: [PATCH] Print version only of pre-installed application and c2cciutils --- c2cciutils/__init__.py | 5 +---- c2cciutils/scripts/main.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/c2cciutils/__init__.py b/c2cciutils/__init__.py index ffe28b792..0312a05a2 100644 --- a/c2cciutils/__init__.py +++ b/c2cciutils/__init__.py @@ -193,16 +193,13 @@ def get_config(branch: Optional[str] = None) -> c2cciutils.configuration.Configu "print_versions": { "versions": [ {"name": "c2cciutils", "cmd": ["c2cciutils", "--version"]}, - {"name": "codespell", "cmd": ["codespell", "--version"], "prefix": "codespell "}, {"name": "java", "cmd": ["java", "-version"]}, {"name": "python", "cmd": ["python3", "--version"]}, {"name": "pip", "cmd": ["python3", "-m", "pip", "--version"]}, {"name": "node", "prefix": "node ", "cmd": ["node", "--version"]}, {"name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"]}, {"name": "docker", "cmd": ["docker", "--version"]}, - {"name": "docker-compose", "cmd": ["docker-compose", "--version"]}, - {"name": "kubectl", "cmd": ["kubectl", "version"]}, - {"name": "k3d/k3s", "cmd": ["k3d", "--version"]}, + {"name": "docker compose", "cmd": ["docker", "compose", "version"]}, ] }, "print_config": True, diff --git a/c2cciutils/scripts/main.py b/c2cciutils/scripts/main.py index 90a7b9f07..36ce43935 100644 --- a/c2cciutils/scripts/main.py +++ b/c2cciutils/scripts/main.py @@ -27,7 +27,7 @@ def main() -> None: print(yaml.dump(c2cciutils.get_config(), default_flow_style=False, Dumper=yaml.SafeDumper)) if args.version: - for pkg in ("c2cciutils", "black", "isort"): + for pkg in ("c2cciutils", "black", "isort", "codespell", "pipenv"): try: print(f"{pkg} {pkg_resources.get_distribution(pkg).version}") except pkg_resources.DistributionNotFound: