wscript (806B)
1 #! /usr/bin/env python 2 # encoding: utf-8 3 4 VERSION = '1.0.0' 5 APPNAME = 'testR' 6 7 top = '.' 8 out = 'build' 9 10 def configure(ctx): 11 ctx.find_program('texi2dvi') 12 ctx.load('R') 13 14 def build(ctx): 15 ctx( 16 rule = '${R} CMD BATCH ${tsk.generator.ropts} ${tsk.generator.fopt % tsk.inputs[1].abspath()} -- ${SRC[0].abspath()} foo.log', 17 source = 'src/test.R src/testSweave.Rnw', 18 target = 'src/testSweave.pdf', 19 cwd = ctx.path.find_node('src').get_bld().abspath(), 20 install_path = '${PREFIX}/share', 21 shell = False, 22 ropts = '--no-restore --no-save --no-readline --numTrees=1000', 23 fopt = '--ffff=%s' 24 ) 25 26 def dist(ctx): 27 ctx.algo = 'zip' 28 ctx.excl = ' **/waf-* **/.waf-* **/*~ **/*.orig **/*.pyc **/*.pyo **/*.bak **/.lock-w* **/*.log **/*.lot **/*.lof **/*.lst **/*.aux **/*.bbl **/*.blg **/*.out **/*.toc' 29