~ubuntu-branches/ubuntu/trusty/graphite-web/trusty

« back to all changes in this revision

Viewing changes to .pc/remove_thirdparty_modules.patch/setup.py

  • Committer: Package Import Robot
  • Author(s): Jonas Genannt
  • Date: 2013-03-09 16:06:34 UTC
  • Revision ID: package-import@ubuntu.com-20130309160634-4j3disdxyqruvsf6
Tags: 0.9.10+debian-1
Initial release. (Closes: #659632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import os
 
4
from glob import glob
 
5
 
 
6
if os.environ.get('USE_SETUPTOOLS'):
 
7
  from setuptools import setup
 
8
  setup_kwargs = dict(zip_safe=0)
 
9
 
 
10
else:
 
11
  from distutils.core import setup
 
12
  setup_kwargs = dict()
 
13
 
 
14
 
 
15
storage_dirs = []
 
16
 
 
17
for subdir in ('whisper', 'rrd', 'log', 'log/webapp'):
 
18
  storage_dirs.append( ('storage/%s' % subdir, []) )
 
19
 
 
20
webapp_content = {}
 
21
 
 
22
for root, dirs, files in os.walk('webapp/content'):
 
23
  for filename in files:
 
24
    filepath = os.path.join(root, filename)
 
25
 
 
26
    if root not in webapp_content:
 
27
      webapp_content[root] = []
 
28
 
 
29
    webapp_content[root].append(filepath)
 
30
 
 
31
 
 
32
conf_files = [ ('conf', glob('conf/*.example')) ]
 
33
examples = [ ('examples', glob('examples/example-*')) ]
 
34
 
 
35
setup(
 
36
  name='graphite-web',
 
37
  version='0.9.10',
 
38
  url='https://launchpad.net/graphite',
 
39
  author='Chris Davis',
 
40
  author_email='chrismd@gmail.com',
 
41
  license='Apache Software License 2.0',
 
42
  description='Enterprise scalable realtime graphing',
 
43
  package_dir={'' : 'webapp'},
 
44
  packages=[
 
45
    'graphite',
 
46
    'graphite.account',
 
47
    'graphite.browser',
 
48
    'graphite.cli',
 
49
    'graphite.composer',
 
50
    'graphite.render',
 
51
    'graphite.whitelist',
 
52
    'graphite.metrics',
 
53
    'graphite.dashboard',
 
54
    'graphite.graphlot',
 
55
    'graphite.events',
 
56
    'graphite.version',
 
57
    'graphite.thirdparty',
 
58
    'graphite.thirdparty.pytz',
 
59
  ],
 
60
  package_data={'graphite' :
 
61
    ['templates/*', 'local_settings.py.example']},
 
62
  scripts=glob('bin/*'),
 
63
  data_files=webapp_content.items() + storage_dirs + conf_files + examples,
 
64
  **setup_kwargs
 
65
)