forked from makerbot/pyserial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
36 lines (27 loc) · 1.03 KB
/
SConstruct
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
#
# Top-level SConstruct file for pyserial
#
AddOption('--test', action='store_true', dest='test')
run_test = GetOption('test')
env = Environment()
def TestClean(env, targets):
if not env.GetOption('clean'):
return False
else:
return True
def CleanActionFunc(env, targets, action):
if TestClean(env, targets):
env.Execute(action)
env.AddMethod(CleanActionFunc, 'CleanAction')
env.Command('pyserial/build', 'pyserial/setup.py',
'cd pyserial;python setup.py build')
#we're not using pyparallel
#env.Command('pyparallel/build', 'pyparallel/setup.py',
# 'cd pyparallel;python setup.py build')
env.CleanAction('pyserial_clean', Action(['rm -r pyserial/build']))
#env.CleanAction('pyparallel_clean', Action(['rm -r pyparallel/build'])
if run_test:
env.Command('pyserial_test', 'pyserial/test/test.py',
'cd pyserial/test; python run_all_tests.py')
# env.Command('pyparallel_test', 'pyparallel/test/test.py',
# 'cd pyparallel/test; python run_all_tests.py')