-
-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathsetup.py
70 lines (61 loc) · 1.81 KB
/
setup.py
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
"""
Sanic
"""
import codecs
import os
import re
from setuptools import find_packages, setup
install_requires = ["sanic>=18.12.0", "pyyaml>=3.0.0"]
dev_requires = ["black==19.3b0", "flake8==3.7.7", "isort==4.3.19"]
doc_requires = [
"recommonmark==0.5.0",
"sphinx==2.1.2",
"sphinx-rtd-theme==0.4.3",
]
test_requires = [
"coverage==4.5.3",
"pytest==4.6.2",
"pytest-cov==2.7.1",
"pytest-html==1.20.0",
"pytest-runner==5.1",
"tox==3.12.1",
]
project_root = os.path.dirname(os.path.abspath(__file__))
with codecs.open(
os.path.join(project_root, "sanic_openapi", "__init__.py"), "r", "latin1"
) as fp:
try:
version = re.findall(
r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M
)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")
with open(os.path.join(project_root, "README.md"), "r", encoding="utf-8") as f:
long_description = f.read()
setup(
name="sanic-openapi",
version=version,
url="http://github.com/sanic-org/sanic-openapi/",
license="MIT",
author="Sanic Community",
description="Easily document your Sanic API with a UI.",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
package_data={"sanic_openapi": ["ui/*"]},
platforms="any",
install_requires=install_requires,
extras_require={
"dev": dev_requires + test_requires + doc_requires,
"test": test_requires,
"doc": doc_requires,
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)