make module executable (#34)

This commit is contained in:
Dave Gallant
2019-10-08 11:41:36 -04:00
committed by GitHub
parent ac46f2ae27
commit 096b0298ae
4 changed files with 14 additions and 6 deletions

12
rfd/__main__.py Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python
"""The main entry point. Invoke as `rfd' or `python -m rfd'.
"""
from .cli import cli
def main():
cli()
if __name__ == "__main__":
main()

View File

@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
version = "0.3.0"
version = "0.3.1"

View File

@@ -160,7 +160,3 @@ def search(num_pages, forum_id, keyword):
)
click.echo(Fore.BLUE + " {}".format(thread.url))
click.echo(Style.RESET_ALL)
if __name__ == "__main__":
cli()

View File

@@ -23,7 +23,7 @@ with io.open(path.join(WORKING_DIR, "README.md"), encoding="utf-8") as f:
setup(
author="Dave Gallant",
description="CLI for RedFlagDeals.com",
entry_points={"console_scripts": ["rfd = rfd.cli:cli"]},
entry_points={"console_scripts": ["rfd = rfd.__main__:cli"]},
install_requires=REQUIREMENTS,
keywords="cli redflagdeals",
license="Apache License, Version 2.0",