diff --git a/_installer_import/pyproject.toml b/_installer_import/pyproject.toml index a6609d3..2e02155 100644 --- a/_installer_import/pyproject.toml +++ b/_installer_import/pyproject.toml @@ -3,7 +3,10 @@ name = "steam-game-installer" version = "0.1.0" description = "Fast Steam game installs: depotdownloader for speed, steamcmd for recognition." requires-python = ">=3.14" -dependencies = [] +# kuhy's shared "Created by kuhy" credit, shown at the end of --help. +dependencies = [ + "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.0#subdirectory=kuhy_credit", +] [project.scripts] steam-game-installer = "steam_installer.cli:main" diff --git a/_installer_import/steam_installer/cli.py b/_installer_import/steam_installer/cli.py index d44b707..27ccd7f 100644 --- a/_installer_import/steam_installer/cli.py +++ b/_installer_import/steam_installer/cli.py @@ -5,6 +5,8 @@ from __future__ import annotations import argparse import sys +from kuhy_credit import credit_line + from steam_installer import ( config, depotdl, @@ -21,7 +23,9 @@ from steam_installer.library import find_steam_root, list_libraries, pick_instal def _build_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( - description="Download an owned Steam game fast, then make Steam recognize it." + description="Download an owned Steam game fast, then make Steam recognize it.", + # kuhy's shared credit line (kuhy_credit, kuhyx/utils). + epilog=credit_line(), ) parser.add_argument( "target", diff --git a/_installer_import/tests/test_cli_credit.py b/_installer_import/tests/test_cli_credit.py new file mode 100644 index 0000000..f51c455 --- /dev/null +++ b/_installer_import/tests/test_cli_credit.py @@ -0,0 +1,14 @@ +"""``--help`` ends on kuhy's shared credit line (kuhy_credit, kuhyx/utils).""" + +import pytest +from kuhy_credit import URL, credit_line +from steam_installer import cli + + +def test_help_ends_with_the_kuhy_credit(capsys): + with pytest.raises(SystemExit) as exc: + cli.main(["--help"]) + assert exc.value.code == 0 + out = capsys.readouterr().out + assert out.rstrip().endswith(credit_line()) + assert URL in out