This can actually be done using the Command builder , specifying a list of actions as follows:
Command('foo.temp', 'foo.in',
['your_external_action',
your_python_function])
Note what foo.inis the source, and you should name it accordingly. But if it foo.tempis internal, as you mention, then this approach is probably not the best approach.
Another way, which, in my opinion, is much more flexible, would be to use Custom Builder with a Generator and / or Emitter .
Generator - Python, , , Python.
An Emitter . Builder Emitter ( Generator) ++ Java IDL Thrift. Thrift, , ( ), Emitter - / - . , Emitter / . , foo.temp , .
Builder , , SCSSS , , , . , .
, , Builder, , , ..