Add a PyMOL builder to SCons and generalize PYMOL_PATH setup.
[thesis.git] / tex / src / figures / expt-sawtooth / SConscript
1 from site_cons.site_init import link_wtk_graph
2
3
4 FIGURES = ['expt-sawtooth']
5
6 # Get the passed in environment.
7 Import('env')
8
9 wtk_graph = link_wtk_graph(env)
10
11 xml_fit = File('sawmodel.xml')
12 expt_sawtooth_data = [
13     env.Command(
14         'expt-Ls.dat',
15         [xml_fit],
16         r"sed -n 's/^ *<L>\(.*\)<\/L>/\1/p' $SOURCE > $TARGET"),
17     ]
18
19 for fig in FIGURES:
20     asyfile = '%s.asy' % fig  # static .asy file
21     pyfig = fig.replace('-', '_')
22     data = '%s_data' % (pyfig)
23     asydata = []
24     if data in globals():     # generated data dependencies
25         asydata = globals()[data]
26     env.Asymptote([asyfile, wtk_graph] + asydata)
27
28 # Pass back the modified environment.
29 Return('env')