Skip to content

Commit

Permalink
Add console script entrypoint (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d authored Feb 9, 2024
1 parent f06dc24 commit 074f50a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ dependencies = [
Repository = "https://github.com/gecio/anycastd"
Issues = "https://github.com/gecio/anycastd/issues"

[project.scripts]
anycastd = "anycastd.__main__:run"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
Expand Down
6 changes: 5 additions & 1 deletion src/anycastd/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ def _check_python_version() -> None:
)


if __name__ == "__main__":
def run() -> None:
_check_python_version()
from anycastd._cli import app

app()


if __name__ == "__main__":
run()

0 comments on commit 074f50a

Please sign in to comment.