forked from graphite-project/graphite-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (50 loc) · 1.47 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
#!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = []
for subdir in ('whisper', 'ceres', 'rrd', 'log', 'log/webapp'):
storage_dirs.append( ('storage/%s' % subdir, []) )
webapp_content = {}
for root, dirs, files in os.walk('webapp/content'):
for filename in files:
filepath = os.path.join(root, filename)
if root not in webapp_content:
webapp_content[root] = []
webapp_content[root].append(filepath)
conf_files = [ ('conf', glob('conf/*.example')) ]
examples = [ ('examples', glob('examples/example-*')) ]
setup(
name='graphite-web',
version='0.10.0-alpha',
url='https://launchpad.net/graphite',
author='Chris Davis',
author_email='[email protected]',
license='Apache Software License 2.0',
description='Enterprise scalable realtime graphing',
package_dir={'' : 'webapp'},
packages=[
'graphite',
'graphite.account',
'graphite.browser',
'graphite.cli',
'graphite.composer',
'graphite.render',
'graphite.whitelist',
'graphite.metrics',
'graphite.dashboard',
'graphite.graphlot',
'graphite.events',
'graphite.version',
],
package_data={'graphite' :
['templates/*', 'local_settings.py.example']},
scripts=glob('bin/*'),
data_files=webapp_content.items() + storage_dirs + conf_files + examples,
**setup_kwargs
)