From 4aeed079f382b8ae4e37c93868452f8d15df4f50 Mon Sep 17 00:00:00 2001 From: Cypheriel <61402923+Cypheriel@users.noreply.github.com> Date: Sun, 19 Nov 2023 16:00:57 -0700 Subject: [PATCH] add entrypoint for pipx --- pyproject.toml | 3 +++ pypush/__main__.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6122fa0..1935e15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,9 @@ ipython = "^8.17.2" asn1crypto = "^1.5.1" websockets = "^12.0" +[tool.poetry.scripts] +pypush = "pypush.__main__:entrypoint" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/pypush/__main__.py b/pypush/__main__.py index bd8825f..1c66b16 100644 --- a/pypush/__main__.py +++ b/pypush/__main__.py @@ -196,5 +196,9 @@ async def output_task(im: imessage.iMessageUser): print(str(msg)) -if __name__ == "__main__": +def entrypoint(): trio.run(main) + + +if __name__ == "__main__": + entrypoint()