Skip to content

kboyd/scons_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scons_r

Description

SCons tool for R. Automatically identifies .r script dependencies and outputs for use with SCons build system.

Installation

scons_r is an external tool for SCons and can most easily be installed by checking out the scons_r repository to either

  1. /path_to_your_project/site_scons/site_tools/scons_r/, for one project only, or
  2. ~/.scons/site_scons/site_tools/scons_r/, for installation for all your projects (SCons 2.1 or above).

See ToolsIndex for more details about installing external tools.

If the project is managed with git, this can be accomplished with submodules:

git submodule add https://github.com/kboyd/scons_r.git site_scons/site_tools/scons_r

Usage

In a SConstruct or SConscript file, create an environment including the R tool and process an R script named input.r with the following python code.

env = Environment(tools=['scons_r'])

env.R('input.r')

Testing

scons_r contains both unit tests and end-to-end SCons style tests. Running them is currently very awkward, still searching for better way to setup and run the tests. My current approach is given below, but will need to be translated to each particular system for particular locations.

unittests (from repository root)

export PYTHONPATH=../:/usr/lib/scons-2.3.1
python unittest/regular\_expression\_test.py

end-to-end tests (from root of scons repo with runtest.py)

./runtest.py path\_to\_repo/test/basic.py

See also

http://www.scons.org/ http://www.scons.org/wiki/ToolsIndex

Releases

No releases published

Packages

No packages published

Languages