Skip to content

Commit

Permalink
main: add entrypoint
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed Jul 28, 2021
1 parent bc12613 commit 769aab0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ requires = [
"configparser >= 3.5; python_version < '3'",
"importlib-resources; python_version < '3.7'",
]

[tool.flit.scripts]
python-installer = "installer.__main__:entrypoint"
5 changes: 5 additions & 0 deletions src/installer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,10 @@ def main(cli_args, program=None):
installer.install(source, destination, {})


def entrypoint(): # type: () -> None
"""CLI entrypoint."""
main(sys.argv[1:])


if __name__ == "__main__":
main(sys.argv[1:], "python -m installer")

0 comments on commit 769aab0

Please sign in to comment.