comparison setup.py @ 7405:e4b9a1d1fea1

cli: initial introduction of 'kallithea-cli' command This commit adds a command 'kallithea-cli' that intends to replace the existing set of 'gearbox' commands that relate to setting up kallithea. Gearbox would still be used for 'gearbox serve', but other commands like 'make-config', 'setup-db', etc. would be converted to 'kallithea-cli' commands. The python package 'Click' is used to generate the CLI. Using decorators, this package makes it very easy to generate a CLI out of simple methods. See: http://click.pocoo.org/7/ Using Gearbox for custom commands is possible, but documentation on this topic is limited. As the added value of Gearbox for that use case is not clear, we can well switch to something else if it seems better/easier.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Sun, 18 Nov 2018 20:02:17 +0100
parents 22c8f23cc75b
children 7784a1212471
comparison
equal deleted inserted replaced
7404:22c8f23cc75b 7405:e4b9a1d1fea1
59 "dulwich >= 0.14.1, < 0.20", 59 "dulwich >= 0.14.1, < 0.20",
60 "mercurial >= 4.1.1, < 4.9", 60 "mercurial >= 4.1.1, < 4.9",
61 "decorator >= 3.3.2, < 4.4", 61 "decorator >= 3.3.2, < 4.4",
62 "Paste >= 2.0.3, < 3", 62 "Paste >= 2.0.3, < 3",
63 "bleach >= 3.0, < 3.1", 63 "bleach >= 3.0, < 3.1",
64 "Click >= 7.0, < 8",
64 ] 65 ]
65 66
66 if sys.version_info < (2, 7): 67 if sys.version_info < (2, 7):
67 requirements.append("importlib == 1.0.1") 68 requirements.append("importlib == 1.0.1")
68 requirements.append("argparse") 69 requirements.append("argparse")
150 entry_points=""" 151 entry_points="""
151 [console_scripts] 152 [console_scripts]
152 kallithea-api = kallithea.bin.kallithea_api:main 153 kallithea-api = kallithea.bin.kallithea_api:main
153 kallithea-gist = kallithea.bin.kallithea_gist:main 154 kallithea-gist = kallithea.bin.kallithea_gist:main
154 kallithea-config = kallithea.bin.kallithea_config:main 155 kallithea-config = kallithea.bin.kallithea_config:main
156 kallithea-cli = kallithea.bin.kallithea_cli:cli
155 157
156 [paste.app_factory] 158 [paste.app_factory]
157 main = kallithea.config.middleware:make_app 159 main = kallithea.config.middleware:make_app
158 160
159 [gearbox.commands] 161 [gearbox.commands]