/
SConscript
97 lines (79 loc) · 2.8 KB
/
SConscript
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
# -*- mode: python; -*-
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
Import('BuildEnv')
OpEnv = BuildEnv.Clone()
setup_sources = [
'setup.py',
'MANIFEST.in',
]
setup_sources_rules = []
for file in setup_sources:
setup_sources_rules.append(
OpEnv.Install(Dir("."), '#controller/src/nodemgr/' + file))
local_sources = [
'__init__.py',
'main.py'
]
local_sources_rules = []
for file in local_sources:
local_sources_rules.append(OpEnv.Install(Dir("nodemgr"), file))
analytics_sources = [
'__init__.py',
'analytics_nodemgr/analytics_event_manager.py'
]
analytics_sources_rules = []
for file in analytics_sources:
analytics_sources_rules.append(OpEnv.Install(Dir("nodemgr/analytics_nodemgr"), file))
control_sources = [
'__init__.py',
'control_nodemgr/control_event_manager.py'
]
control_sources_rules = []
for file in control_sources:
control_sources_rules.append(OpEnv.Install(Dir("nodemgr/control_nodemgr"), file))
config_sources = [
'__init__.py',
'config_nodemgr/config_event_manager.py'
]
config_sources_rules = []
for file in config_sources:
config_sources_rules.append(OpEnv.Install(Dir("nodemgr/config_nodemgr"), file))
vrouter_sources = [
'__init__.py',
'vrouter_nodemgr/vrouter_process_stat.py',
'vrouter_nodemgr/loadbalancer_stats.py',
'vrouter_nodemgr/haproxy_stats.py',
'vrouter_nodemgr/vrouter_event_manager.py'
]
vrouter_sources_rules = []
for file in vrouter_sources:
vrouter_sources_rules.append(OpEnv.Install(Dir("nodemgr/vrouter_nodemgr"), file))
database_sources = [
'__init__.py',
'database_nodemgr/database_event_manager.py'
]
database_sources_rules = []
for file in database_sources:
database_sources_rules.append(OpEnv.Install(Dir("nodemgr/database_nodemgr"), file))
common_sources = [
'__init__.py',
'common/event_manager.py',
'common/process_stat.py',
'common/event_listener_protocol_nodemgr.py',
]
common_sources_rules = []
for file in common_sources:
common_sources_rules.append(OpEnv.Install(Dir("nodemgr/common"), file))
sdist_depends = [setup_sources_rules, local_sources_rules, analytics_sources_rules,
control_sources_rules, config_sources_rules, common_sources_rules,
vrouter_sources_rules, database_sources_rules
]
cd_cmd = 'cd ' + Dir('.').path + ' && '
sdist_gen = OpEnv.Command('dist', 'setup.py', cd_cmd + 'python setup.py sdist')
OpEnv.Depends(sdist_gen, sdist_depends)
OpEnv.Default(sdist_gen)
OpEnv.Alias("src:nodemgr", sdist_gen)
OpEnv.Alias("contrail-nodemgr", sdist_gen)