diff --git a/pyproject.toml b/pyproject.toml index 20cf70c8..e342ad77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ dev = [ ] [project.scripts] -gphotos-sync = "photos_sync.__main__:main" +gphotos-sync = "gphotos_sync.__main__:main" [project.urls] GitHub = "https://github.com/gilesknap/gphotos-sync" @@ -57,7 +57,7 @@ name = "Giles Knap" [tool.setuptools_scm] -write_to = "src/photos_sync/_version.py" +write_to = "src/gphotos_sync/_version.py" [tool.mypy] ignore_missing_imports = true # Ignore missing stubs in imported modules diff --git a/src/gphotos_sync/__main__.py b/src/gphotos_sync/__main__.py index 43366329..235986b2 100644 --- a/src/gphotos_sync/__main__.py +++ b/src/gphotos_sync/__main__.py @@ -1,7 +1,6 @@ from argparse import ArgumentParser from . import __version__ -from .hello import HelloClass, say_hello_lots __all__ = ["main"] @@ -9,10 +8,7 @@ def main(args=None): parser = ArgumentParser() parser.add_argument("--version", action="version", version=__version__) - parser.add_argument("name", help="Name of the person to greet") - parser.add_argument("--times", type=int, default=5, help="Number of times to greet") args = parser.parse_args(args) - say_hello_lots(HelloClass(args.name), args.times) # test with: python -m gphotos_sync diff --git a/src/photos_sync/__init__.py b/src/photos_sync/__init__.py deleted file mode 100644 index 49865e13..00000000 --- a/src/photos_sync/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -import sys - -if sys.version_info < (3, 8): - from importlib_metadata import version # noqa -else: - from importlib.metadata import version # noqa - -__version__ = version("gphotos-sync") -del version - -__all__ = ["__version__"] diff --git a/src/photos_sync/__main__.py b/src/photos_sync/__main__.py deleted file mode 100644 index 8c8b8792..00000000 --- a/src/photos_sync/__main__.py +++ /dev/null @@ -1,16 +0,0 @@ -from argparse import ArgumentParser - -from . import __version__ - -__all__ = ["main"] - - -def main(args=None): - parser = ArgumentParser() - parser.add_argument("-v", "--version", action="version", version=__version__) - args = parser.parse_args(args) - - -# test with: python -m photos_sync -if __name__ == "__main__": - main() diff --git a/tests/test_cli.py b/tests/test_cli.py index a74f90e7..77586a54 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,9 +1,9 @@ import subprocess import sys -from photos_sync import __version__ +from gphotos_sync import __version__ def test_cli_version(): - cmd = [sys.executable, "-m", "photos_sync", "--version"] + cmd = [sys.executable, "-m", "gphotos_sync", "--version"] assert subprocess.check_output(cmd).decode().strip() == __version__