This repository was archived by the owner on Dec 6, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (56 loc) · 1.84 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pydeployr
usage: python setup.py install
created by hgschmidt on 26.12.12, 16:48 CET
Copyright (c) 2012 apitrary
"""
import sys
import os
from setuptools import setup, find_packages
def read(fname):
"""
Read the README.md file
"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def read_requirements():
"""
Read the requirements.txt file
"""
with open('requirements.txt') as f:
requirements = f.readlines()
return [element.strip() for element in requirements]
def get_template_base_dir():
if sys.platform == 'darwin':
template_dir = "{}/.deployr/templates".format(os.getenv("HOME"))
elif sys.platform == 'linux2':
template_dir = "/etc/deployr/templates"
else:
template_dir = "{}/.deployr/templates".format(os.getenv("HOME"))
return template_dir
setup(
name='pytools',
version='0.2.2.2',
author='Hans-Gunther Schmidt',
author_email='[email protected]',
description='pytools - apitrary pytools',
long_description=read('README.md'),
url='http://apitrary.com',
install_requires=read_requirements(),
keywords='pytools pybuildr pydeployr pybalancr pyloggr pytoolslib pytrackr apitrary application',
packages=find_packages('.'),
package_dir={'': '.'},
data_files=[
(get_template_base_dir(), ['pytools/pydeployr/templates/genapi_base.tpl']),
(get_template_base_dir(), ['pytools/pybalancr/templates/genapi_backends.tpl']),
(get_template_base_dir(), ['pytools/pybalancr/templates/genapi_frontends.tpl'])
],
scripts=[
'pytools/pybalancr/balancr_tasks.py',
'pytools/pydeployr/deployr_tasks.py',
'pytools/pybuildr/buildr.py',
'pytools/pyloggr/loggr.py',
'pytools/pytrackr/trackr.py'
]
)