[System][Doc] Made bjoern optional

This commit is contained in:
Ferdinand Thiessen 2020-10-28 14:21:54 +01:00
parent 216b757740
commit 254a64efec
3 changed files with 13 additions and 8 deletions

View File

@ -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:

View File

@ -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:
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):

View File

@ -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",