Finally. Was confused by Setuptools docs on entrypoints

This commit is contained in:
Jeffrey Serio 2022-09-30 19:35:24 -05:00
parent a194c1d89e
commit 40b6fcb683
4 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
[metadata]
description-file=README.md
license_file=LICENSE
description_file=README.md
license_file=LICENSE
[flake8]
max-line-length = 100
extend-ignore =
E203 # https://github.com/psf/black/blob/master/docs/the_black_code_style.md#slices

View File

@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name="daily-event-logger",
version="0.0.3",
version="0.0.7",
license="GPL-3.0",
author="Jeffrey Serio",
author_email="hyperreal@fedoraproject.org",
@ -17,7 +17,7 @@ setup(
],
entry_points={
"console_scripts": [
"elog = elog",
"elog = elog.elog:main",
]
},
)

View File

@ -15,7 +15,7 @@ from rich.traceback import install
install(show_locals=True)
VERSION = "0.0.2"
VERSION = "0.0.7"
default_date = dt.date.today().strftime("%Y-%m-%d")
ELOG_DIR = os.getenv("ELOG_DIR")
@ -309,7 +309,7 @@ search_parser.add_argument(
search_parser.set_defaults(func=elog_search)
if __name__ == "__main__":
def main():
if len(sys.argv) < 2:
parser.print_usage()
else: