-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
43 lines (35 loc) · 999 Bytes
/
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
import codecs
import os
import re
from setuptools import setup, find_packages
def open_local(paths, mode="r", encoding="utf8"):
path = os.path.join(os.path.abspath(os.path.dirname(__file__)), *paths)
return codecs.open(path, mode, encoding)
with open_local(["sanic_template", "__version__.py"], encoding="latin1") as fp:
try:
version = re.findall(
r"^VERSION = \"([^']+)\"\r?$", fp.read(), re.M
)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")
setup(
name='sanic_template',
version=version,
description='A template for projects based on Sanic',
author='prryplatypus',
author_email='[email protected]',
packages=find_packages(),
install_requires=[
'cerberus', # Validation
'databases', # Database
'sanic',
'sanic-ext',
],
extras_require={
'dev': [
'black',
'flake8',
'isort',
]
}
)