-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
74 lines (61 loc) · 2.31 KB
/
setup.py
File metadata and controls
74 lines (61 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- coding: utf-8 -*-
from re import compile
from io import open as iopen
from ast import literal_eval
from setuptools import setup
def _get_version():
version_re = compile(r"__version__\s+=\s+(.*)")
with open("flask_pluginkit/version.py", "rb") as fh:
version = literal_eval(version_re.search(fh.read().decode("utf-8")).group(1))
return str(version)
def _get_author():
author_re = compile(r"__author__\s+=\s+(.*)")
mail_re = compile(r"(.*)\s<(.*)>")
with open("flask_pluginkit/__init__.py", "rb") as fh:
author = literal_eval(author_re.search(fh.read().decode("utf-8")).group(1))
return (mail_re.search(author).group(1), mail_re.search(author).group(2))
def _get_readme():
with iopen("README.rst", "rt", encoding="utf8") as f:
return f.read()
version = _get_version()
(author, email) = _get_author()
gh = "https://github.com/staugur/Flask-PluginKit"
setup(
name="Flask-PluginKit",
version=version,
url=gh,
download_url="{gh}/releases/tag/v{v}".format(gh=gh, v=version),
project_urls={
"Code": gh,
"Issue tracker": "{gh}/issues".format(gh=gh),
"Documentation": "https://flask-pluginkit.rtfd.vip",
},
license="BSD 3-Clause",
author=author,
author_email=email,
keywords="flask plugin",
description="Load and run plugins for your Flask application",
long_description=_get_readme(),
packages=["flask_pluginkit"],
include_package_data=True,
zip_safe=False,
python_requires=">=3.9",
install_requires=["Flask>=3.0.0", "semver>=3.0.0"],
extras_require={"redis": ["redis>=5.0.0"]},
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Flask",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)