forked from graphite-project/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (36 loc) · 1.3 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
#!/usr/bin/env python
import os
import platform
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 = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log',[]), ('storage/rrd',[]) ]
conf_files = [ ('conf', glob('conf/*.example')) ]
install_files = storage_dirs + conf_files
# If we are building on RedHat, let's use the redhat init scripts.
if platform.dist()[0] == 'redhat':
init_scripts = [ ('/etc/init.d', ['distro/redhat/init.d/carbon-cache',
'distro/redhat/init.d/carbon-relay',
'distro/redhat/init.d/carbon-aggregator']) ]
install_files += init_scripts
setup(
name='carbon',
version='0.9.10',
url='https://launchpad.net/graphite',
author='Chris Davis',
author_email='[email protected]',
license='Apache Software License 2.0',
description='Backend data caching and persistence daemon for Graphite',
packages=['carbon', 'carbon.aggregator', 'twisted.plugins'],
package_dir={'' : 'lib'},
scripts=glob('bin/*'),
package_data={ 'carbon' : ['*.xml'] },
data_files=install_files,
install_requires=['twisted', 'txamqp'],
**setup_kwargs
)