-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
81 lines (64 loc) · 2.19 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
71
72
73
74
75
76
77
78
79
80
81
import inspect
import os
import sys
from setuptools import setup
if sys.version_info < (3, 4, 0):
sys.stderr.write('FATAL: base template needs to be installed with Python 3.4+\n')
sys.exit(1)
__location__ = os.path.join(os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())))
def read_version(package):
data = {}
with open(os.path.join(package.replace('.', '/'), 'version.py'), 'r') as fd:
exec(fd.read(), data)
return data['__version__']
def get_install_requirements(path):
content = open(os.path.join(__location__, path)).read()
return [req for req in content.split('\\n') if req != '']
def read(fname):
return open(os.path.join(__location__, fname)).read()
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Database'
]
NAME = 'acid.senza.templates'
MAIN_PACKAGE = NAME
VERSION = read_version(MAIN_PACKAGE)
DESCRIPTION = 'Senza template for the automatic PosgreSQL DB deployments'
LICENSE = "Apache License 2.0"
URL = 'https://github.com/zalando-incubator/senza-base-template'
AUTHOR = 'Oleksii Kliukin'
AUTHOR_EMAIL = 'oleksii.kliukin@zalando.de'
KEYWORDS = 'senza postgres'
def setup_packages():
install_reqs = get_install_requirements('requirements.txt')
setup(
name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
license=LICENSE,
keywords=KEYWORDS,
description=DESCRIPTION,
packages=[NAME],
install_requires=install_reqs,
setup_requires=[
"flake8"
],
long_description=read('README.rst'),
entry_points={
'senza.templates':
['base=acid.senza.templates.base']
}
)
if __name__ == '__main__':
setup_packages()