From b32905f6fc791eefa7670f89ed0e80921026878f Mon Sep 17 00:00:00 2001 From: Jimmy O'Rourke Date: Sun, 25 Mar 2018 17:55:30 -0400 Subject: [PATCH] replace pokemon and ichooseyou scripts with proper setuptools cross platform entrypoints --- ichooseyou | 1 - pokemon | 8 -------- pokemonterminal/main.py | 2 +- setup.py | 7 ++++++- 4 files changed, 7 insertions(+), 11 deletions(-) delete mode 120000 ichooseyou delete mode 100755 pokemon diff --git a/ichooseyou b/ichooseyou deleted file mode 120000 index 4ec5cea..0000000 --- a/ichooseyou +++ /dev/null @@ -1 +0,0 @@ -pokemon \ No newline at end of file diff --git a/pokemon b/pokemon deleted file mode 100755 index 518bda5..0000000 --- a/pokemon +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python3.6 - -import sys - -from pokemonterminal.main import main - - -main(sys.argv[1:]) diff --git a/pokemonterminal/main.py b/pokemonterminal/main.py index 1665215..c235db8 100644 --- a/pokemonterminal/main.py +++ b/pokemonterminal/main.py @@ -55,7 +55,7 @@ def slideshow(filtered, delay, changer_func): p.join(delay * 60) -def main(argv): +def main(argv=None): """Entrance to the program.""" if __name__ != "__main__": Filter.filtered_list = [pok for pok in Filter.POKEMON_LIST] diff --git a/setup.py b/setup.py index 7968976..165ab00 100755 --- a/setup.py +++ b/setup.py @@ -50,7 +50,12 @@ Supports ITerm2, Terminology & Tilix.""", "pokemonterminal": package_data("pokemonterminal", ["Data", "Images"]), }, - scripts=['pokemon', 'ichooseyou'], + entry_points = { + 'console_scripts': [ + 'pokemon = pokemonterminal.main:main', + 'ichooseyou = pokemonterminal.main:main', + ], + }, keywords="pokemon terminal theme style pokemon-terminal",