2021-03-25 12:12:28 +00:00
|
|
|
from setuptools import setup, find_packages, Command
|
|
|
|
import subprocess
|
2021-03-18 13:05:28 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
mysql_driver = "PyMySQL" if os.name == "nt" else "mysqlclient"
|
2020-08-13 17:48:26 +00:00
|
|
|
|
2021-03-25 12:12:28 +00:00
|
|
|
|
|
|
|
class DocsCommand(Command):
|
2021-03-28 02:08:35 +00:00
|
|
|
description = "Generate and export API documentation using pdoc3"
|
2021-03-25 12:12:28 +00:00
|
|
|
user_options = [
|
|
|
|
# The format is (long option, short option, description).
|
|
|
|
("output=", "o", "Documentation output path"),
|
|
|
|
]
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
self.output = "./docs"
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
"""Run command."""
|
2021-11-18 11:54:37 +00:00
|
|
|
command = [
|
|
|
|
"python",
|
|
|
|
"-m",
|
|
|
|
"pdoc",
|
|
|
|
"--skip-errors",
|
|
|
|
"--html",
|
|
|
|
"--output-dir",
|
|
|
|
self.output,
|
|
|
|
"flaschengeist",
|
|
|
|
]
|
2021-03-25 12:12:28 +00:00
|
|
|
self.announce(
|
|
|
|
"Running command: %s" % str(command),
|
|
|
|
)
|
|
|
|
subprocess.check_call(command)
|
|
|
|
|
|
|
|
|
2020-08-13 17:48:26 +00:00
|
|
|
setup(
|
|
|
|
packages=find_packages(),
|
2020-10-28 13:21:54 +00:00
|
|
|
package_data={"": ["*.toml"]},
|
2020-09-07 14:07:35 +00:00
|
|
|
scripts=["run_flaschengeist"],
|
2021-03-18 11:20:17 +00:00
|
|
|
python_requires=">=3.7",
|
2020-09-07 14:07:35 +00:00
|
|
|
install_requires=[
|
2021-11-16 13:06:31 +00:00
|
|
|
"Flask >= 2.0",
|
2020-10-28 13:21:54 +00:00
|
|
|
"toml",
|
2021-11-16 13:06:31 +00:00
|
|
|
"sqlalchemy>=1.4.26",
|
2021-03-20 11:19:39 +00:00
|
|
|
"flask_sqlalchemy>=2.5",
|
2020-09-07 14:07:35 +00:00
|
|
|
"flask_cors",
|
2021-11-15 15:32:24 +00:00
|
|
|
"Pillow>=8.4.0",
|
2020-09-07 14:07:35 +00:00
|
|
|
"werkzeug",
|
2021-03-18 16:27:19 +00:00
|
|
|
mysql_driver,
|
2020-09-07 14:07:35 +00:00
|
|
|
],
|
2021-07-29 13:50:03 +00:00
|
|
|
extras_require={
|
|
|
|
"ldap": ["flask_ldapconn", "ldap3"],
|
|
|
|
"argon": ["argon2-cffi"],
|
|
|
|
"test": ["pytest", "coverage"],
|
|
|
|
},
|
2020-09-01 23:10:54 +00:00
|
|
|
entry_points={
|
2021-11-28 21:24:49 +00:00
|
|
|
"flaschengeist.plugins": [
|
2020-10-30 21:19:16 +00:00
|
|
|
# Authentication providers
|
|
|
|
"auth_plain = flaschengeist.plugins.auth_plain:AuthPlain",
|
|
|
|
"auth_ldap = flaschengeist.plugins.auth_ldap:AuthLDAP [ldap]",
|
|
|
|
# Route providers (and misc)
|
2020-10-30 02:30:46 +00:00
|
|
|
"auth = flaschengeist.plugins.auth:AuthRoutePlugin",
|
|
|
|
"users = flaschengeist.plugins.users:UsersPlugin",
|
|
|
|
"roles = flaschengeist.plugins.roles:RolesPlugin",
|
2020-10-30 21:19:16 +00:00
|
|
|
"balance = flaschengeist.plugins.balance:BalancePlugin",
|
2020-10-30 02:30:46 +00:00
|
|
|
"mail = flaschengeist.plugins.message_mail:MailMessagePlugin",
|
2021-11-15 15:32:24 +00:00
|
|
|
"pricelist = flaschengeist.plugins.pricelist:PriceListPlugin",
|
2021-12-06 22:48:05 +00:00
|
|
|
"scheduler = flaschengeist.plugins.scheduler:SchedulerPlugin",
|
2020-08-22 12:02:39 +00:00
|
|
|
],
|
2020-09-07 14:07:35 +00:00
|
|
|
},
|
2021-03-25 12:12:28 +00:00
|
|
|
cmdclass={
|
|
|
|
"docs": DocsCommand,
|
|
|
|
},
|
2020-08-13 17:48:26 +00:00
|
|
|
)
|