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()