Create pyproject config with script entry point

This commit is contained in:
Tim Van Baak 2022-12-12 20:28:29 -08:00
parent c51e70a809
commit fe51ac4250
3 changed files with 30 additions and 0 deletions

0
fhex/__init__.py Normal file
View File

13
fhex/__main__.py Normal file
View File

@ -0,0 +1,13 @@
import argparse
def main():
parser = argparse.ArgumentParser()
args = parser.parse_args()
print("Hello, world!")
if __name__ == "__main__":
main()

17
pyproject.toml Normal file
View File

@ -0,0 +1,17 @@
[tool.poetry]
name = "fhex"
version = "0.1.0"
description = ""
authors = ["Tim Van Baak <tim.vanbaak@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.9"
[tool.poetry.dev-dependencies]
[tool.poetry.scripts]
friendly-hex = "fhex.__main__:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"