forked from sonic-net/sonic-host-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (86 loc) · 2.65 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
from __future__ import print_function
import sys
from setuptools import setup
import pkg_resources
from packaging import version
# sonic_dependencies, version requirement only supports '>='
sonic_dependencies = ['sonic-py-common', 'sonic-utilities']
for package in sonic_dependencies:
try:
package_dist = pkg_resources.get_distribution(package.split(">=")[0])
except pkg_resources.DistributionNotFound:
print(package + " is not found!", file=sys.stderr)
print("Please build and install SONiC python wheels dependencies from sonic-buildimage", file=sys.stderr)
exit(1)
if ">=" in package:
if version.parse(package_dist.version) >= version.parse(package.split(">=")[1]):
continue
print(package + " version not match!", file=sys.stderr)
exit(1)
setup(
name = 'sonic-host-services',
version = '1.0',
description = 'Python services which run in the SONiC host OS',
license = 'Apache 2.0',
author = 'SONiC Team',
author_email = 'linuxnetdev@microsoft.com',
url = 'https://github.com/Azure/sonic-buildimage',
maintainer = 'Joe LeVeque',
maintainer_email = 'jolevequ@microsoft.com',
packages = [
'host_modules'
],
scripts = [
'scripts/caclmgrd',
'scripts/hostcfgd',
'scripts/featured',
'scripts/aaastatsd',
'scripts/procdockerstatsd',
'scripts/determine-reboot-cause',
'scripts/process-reboot-cause',
'scripts/sonic-host-server',
'scripts/ldap.py'
],
install_requires = [
'dbus-python',
'systemd-python',
'Jinja2>=2.10',
'PyGObject',
'psutil'
] + sonic_dependencies,
setup_requires = [
'pytest-runner',
'wheel'
],
tests_require = [
'parameterized',
'pytest',
'pyfakefs',
'sonic-py-common',
'deepdiff==6.2.2',
'psutil'
],
extras_require = {
"testing": [
'parameterized',
'pytest',
'pyfakefs',
'sonic-py-common',
'deepdiff==6.2.2'
]
},
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.7',
'Topic :: System',
],
keywords = 'sonic SONiC host services',
test_suite = 'setup.get_test_suite'
)