[Scons-users] Scanners

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Fri Jan 24 03:52:46 EST 2014


Is it possible to have a different scanner run on a source file depending on the builder in use?

I currently have a scanner registered with

env.Append(SCANNERS = Scanner(function = _scanner, name = 'Python', skeys [ =['.py], recursive = recurse_check, path_function = FindPathDirs('PYTHONPATH'))

which is used (implicitly) for several builders.

However I have another builder where I need to use a slightly different scanner. If I do
Builder(blah, source_scanner = Scanner(function = _different_scanner, skeys = ['.py'], ...)

will that do what I hope - i.e. use _different_scanner on .py files for that builder?

Thanks


More information about the Scons-users mailing list