From e2f9bfefc83c0015597416d45a5aa6afaa531c2b Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 21 Apr 2023 21:17:36 +0000 Subject: [PATCH] Allow for using `python -m` --- pyjs_code_runner/cli/__main__.py | 4 ++++ pyjs_code_runner/cli/main.py | 9 --------- setup.py | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 pyjs_code_runner/cli/__main__.py delete mode 100644 pyjs_code_runner/cli/main.py diff --git a/pyjs_code_runner/cli/__main__.py b/pyjs_code_runner/cli/__main__.py new file mode 100644 index 0000000..e460b2b --- /dev/null +++ b/pyjs_code_runner/cli/__main__.py @@ -0,0 +1,4 @@ +from .app import app + +if __name__ == "__main__": + app() diff --git a/pyjs_code_runner/cli/main.py b/pyjs_code_runner/cli/main.py deleted file mode 100644 index 3befd7d..0000000 --- a/pyjs_code_runner/cli/main.py +++ /dev/null @@ -1,9 +0,0 @@ -from .app import app -from .run import * # noqa: F401, F403 -from .version import * # noqa: F401, F403 - -if __name__ == "__main__": - from rich.console import Console - - err_console = Console(stderr=True) - app(show_locals=False) diff --git a/setup.py b/setup.py index 7b73ba8..fc39e89 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ description="pyjs_code_runner emscripten+boa", entry_points={ "console_scripts": [ - "pyjs_code_runner=pyjs_code_runner.cli.main:app", + "pyjs_code_runner=pyjs_code_runner.cli.app:app", ], }, install_requires=requirements,