forked from DataDog/dd-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
124 lines (110 loc) · 3.33 KB
/
setup.py
File metadata and controls
124 lines (110 loc) · 3.33 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import platform
import sys
from config import *
from jmxfetch import JMX_FETCH_JAR_NAME
try:
from setuptools import setup, find_packages
# required to build the cython extensions
from distutils.extension import Extension
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
# Extra arguments to pass to the setup function
extra_args = {}
# Prereqs of the build. Won't get installed when deploying the egg.
setup_requires = [
]
# Prereqs of the install. Will install when deploying the egg.
install_requires=[
]
if sys.platform == 'win32':
from glob import glob
import py2exe
install_requires.extend([
'tornado==3.0.1',
'pywin32==217',
'wmi==1.4.9',
'simplejson==2.6.1',
'mysql-python==1.2.3',
'pymongo==2.3',
'psycopg2==2.4.5',
'python-memcached==1.48',
'redis==2.6.2',
'adodbapi'
'elementtree',
'pycurl',
'MySQLdb',
'psutil',
])
# Modules to force-include in the exe
include_modules = [
# 3p
'win32service',
'win32serviceutil',
'win32event',
'simplejson',
'adodbapi',
'elementtree.ElementTree',
'pycurl',
'tornado.curl_httpclient',
'pymongo',
'MySQLdb',
'psutil',
# agent
'checks.services_checks',
'checks.libs.httplib2',
# pup
'pup',
'pup.pup',
'tornado.websocket',
'tornado.web',
'tornado.ioloop',
]
class Target(object):
def __init__(self, **kw):
self.__dict__.update(kw)
self.version = get_version()
self.company_name = 'Datadog, Inc.'
self.copyright = 'Copyright 2013 Datadog, Inc.'
self.cmdline_style = 'pywin32'
agent_svc = Target(name='Datadog Agent', modules='win32.agent', dest_base='ddagent')
extra_args = {
'options': {
'py2exe': {
'includes': ','.join(include_modules),
'optimize': 0,
'compressed': True,
'bundle_files': 3,
},
},
'console': ['win32\shell.py'],
'service': [agent_svc],
'windows': [{'script': 'win32\gui.py',
'dest_base': "agent-manager",
'uac_info': "requireAdministrator", # The manager needs to be administrator to stop/start the service
'icon_resources': [(1, r"packaging\datadog-agent\win32\install_files\dd_agent_win_256.ico")],
}],
'data_files': [
("Microsoft.VC90.CRT", glob(r'C:\Python27\redist\*.*')),
('pup', glob('pup/pup.html')),
('pup', glob('pup/status.html')),
('pup/static', glob('pup/static/*.*')),
('jmxfetch', glob('checks/libs/%s' % JMX_FETCH_JAR_NAME)),
],
}
setup(
name='datadog-agent',
version=get_version(),
description="DevOps' best friend",
author='DataDog',
author_email='[email protected]',
url='http://www.datadoghq.com',
install_requires=install_requires,
setup_requires=setup_requires,
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
test_suite='nose.collector',
zip_safe=False,
**extra_args
)