diff 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
line wrap: on
line diff
--- a/setup.py	Mon Nov 05 00:31:07 2018 +0100
+++ b/setup.py	Sun Nov 18 20:02:17 2018 +0100
@@ -61,6 +61,7 @@
     "decorator >= 3.3.2, < 4.4",
     "Paste >= 2.0.3, < 3",
     "bleach >= 3.0, < 3.1",
+    "Click >= 7.0, < 8",
 ]
 
 if sys.version_info < (2, 7):
@@ -152,6 +153,7 @@
     kallithea-api =    kallithea.bin.kallithea_api:main
     kallithea-gist =   kallithea.bin.kallithea_gist:main
     kallithea-config = kallithea.bin.kallithea_config:main
+    kallithea-cli =    kallithea.bin.kallithea_cli:cli
 
     [paste.app_factory]
     main = kallithea.config.middleware:make_app