forked from graphite-project/graphite-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (50 loc) · 1.48 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
#!/usr/bin/env python
import os
from glob import glob
from collections import defaultdict
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 = defaultdict(list)
for root, dirs, files in os.walk('webapp/content'):
for filename in files:
filepath = os.path.join(root, filename)
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.dashboard',
'graphite.events',
'graphite.finders',
'graphite.graphlot',
'graphite.metrics',
'graphite.render',
'graphite.version',
'graphite.whitelist',
],
package_data={'graphite' :
['templates/*', 'local_settings.py.example']},
scripts=glob('bin/*'),
data_files=webapp_content.items() + storage_dirs + conf_files + examples,
**setup_kwargs
)