From 254a64efecdc6bd4852d7644aff8f38faf4f3bc8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 28 Oct 2020 14:21:54 +0100 Subject: [PATCH] [System][Doc] Made bjoern optional --- flaschengeist/readme.md | 6 +++++- run_flaschengeist | 8 +++++--- setup.py | 7 +++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/flaschengeist/readme.md b/flaschengeist/readme.md index 3f4aaff..a158069 100644 --- a/flaschengeist/readme.md +++ b/flaschengeist/readme.md @@ -3,12 +3,16 @@ ## Installation ### Requirements - mysql or mariadb -- python 3.4+ +- python 3.6+ ### Install python files pip3 install --user . or with ldap support pip3 install --user ".[ldap]" +or if you want to use bjoern as the HTTP server: + + pip3 install --user ".[ldap,bjoern]" + #### Windows Same as above, but for mysql you have to follow this guide: diff --git a/run_flaschengeist b/run_flaschengeist index 083e36a..c42bc85 100644 --- a/run_flaschengeist +++ b/run_flaschengeist @@ -1,8 +1,6 @@ #!/usr/bin/python3 import inspect import argparse -import bjoern -import typing def install(arguments): @@ -21,7 +19,11 @@ def run(arguments): if arguments.debug: app.run(arguments.host, arguments.port, debug=True) else: - bjoern.run(app, arguments.host, arguments.port, reuse_port=True) + try: + import bjoern + bjoern.run(app, arguments.host, arguments.port, reuse_port=True) + except ImportError: + app.run(arguments.host, arguments.port, debug=False) def export(arguments): diff --git a/setup.py b/setup.py index a7f525f..55f8789 100644 --- a/setup.py +++ b/setup.py @@ -8,19 +8,18 @@ setup( author_email="tim@groeger-clan.de", description="Does things", packages=find_packages(), - package_data={"": ["*.yml"]}, + package_data={"": ["*.toml"]}, scripts=["run_flaschengeist"], install_requires=[ "Flask >= 1.1", - "PyYAML>=5.3.1", + "toml", "sqlalchemy>=1.3", "flask_sqlalchemy", "flask_cors", "werkzeug", - "bjoern", "python-dateutil", ], - extras_require={"ldap": ["flask_ldapconn", "ldap3"]}, + extras_require={"ldap": ["flask_ldapconn", "ldap3"], "bjoern": ["bjoern"]}, entry_points={ "flaschengeist.plugin": [ "auth = flaschengeist.modules.auth:AuthRoutePlugin",