This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
99 lines (82 loc) · 2.24 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
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
# canaryd
# File: setup.py
# Desc: canaryd package setup
'''
Due to the low-level nature of canaryd, this setup.py targets both setuptools
for systems that have it and the stdlib distutils for those that don't.
'''
SCRIPTS = (
'bin/canaryctl',
'bin/canaryd',
)
PACKAGES = (
'canaryd',
'canaryd.ctl',
'canaryd.plugins',
# Packages
'canaryd_packages',
'canaryd_packages.click',
# Requests package
'canaryd_packages.requests',
'canaryd_packages.requests.packages',
'canaryd_packages.requests.packages.chardet',
'canaryd_packages.requests.packages.urllib3',
'canaryd_packages.requests.packages.urllib3.contrib',
'canaryd_packages.requests.packages.urllib3.packages',
'canaryd_packages.requests.packages.urllib3.packages.backports',
'canaryd_packages.requests.packages.urllib3.packages.ssl_match_hostname',
'canaryd_packages.requests.packages.urllib3.util',
)
TEST_REQUIRES = (
'nose==1.3.7',
'jsontest==1.3',
'coverage==4.5.1',
'mock==1.3.0',
'dictdiffer==0.6.1',
)
DEV_REQUIRES = TEST_REQUIRES + (
# Releasing
'wheel',
'twine==1.11.0',
# Dev debugging
'ipdb',
'ipdbplugin',
)
version_data = {}
with open('canaryd/version.py') as f:
exec(f.read(), version_data)
# distutils/setuptools compatbile kwargs
setup_kwargs = {
'name': 'canaryd',
'version': version_data['__version__'],
'description': 'Client for Service Canary',
'author': 'Oxygem',
'author_email': '[email protected]',
'license': 'MIT',
'url': 'https://servicecanary.com',
'packages': PACKAGES,
'scripts': SCRIPTS,
'include_package_data': True,
# This must match the contents of MANIFEST.in, to provide full support for
# distutil, setuptools everywhere. Annoying.
'package_data': {
'canaryd': [
'init_scripts/*',
'scripts/*',
],
'canaryd_packages.requests': [
'*.pem',
],
},
}
# Attatch extras if setuptools is present
try:
from setuptools import setup
setup_kwargs['extras_require'] = {
'dev': DEV_REQUIRES,
'test': TEST_REQUIRES,
}
# Otherwsie fallback to distutils
except ImportError:
from distutils.core import setup
setup(**setup_kwargs)