1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-10-15 09:42:22 +00:00

Added option to install dependencies in CLI

This commit is contained in:
J. Fernando Sánchez
2016-09-21 20:27:30 +02:00
parent 0d511ad3c3
commit 07b5dd3823
5 changed files with 34 additions and 11 deletions

View File

@@ -65,6 +65,11 @@ def main():
type=str,
default='plugins',
help='Where to look for plugins.')
parser.add_argument('--only-install',
'-i',
action='store_true',
default=False,
help='Do not run a server, only install the dependencies of the plugins.')
args = parser.parse_args()
logging.basicConfig()
rl = logging.getLogger()
@@ -72,6 +77,9 @@ def main():
app = Flask(__name__)
app.debug = args.debug
sp = Senpy(app, args.plugins_folder, default_plugins=args.default_plugins)
if args.only_install:
sp.install_deps()
return
sp.activate_all()
http_server = WSGIServer((args.host, args.port), app)
try: