[Scons-users] Forcing projects to build in order

Gary Oberbrunner garyo at oberbrunner.com
Fri Aug 7 08:08:56 EDT 2015


On Fri, Aug 7, 2015 at 6:54 AM, Sven Lars Tobias Stål <smp428 at alumni.ku.dk>
wrote:

> I’d like to second that wish. The option to pin processes to run first or
> last would be very useful also in other applications, especially for us who
> are not experts in compilation and construction tools.
>
> I’m using Scons only to build reproducible processing flows for
> geophysical data. SCons is really great for the purpose of many reasons!
> However, processing times are often long and it would be fantastic to be
> able to e.g. run a python code to notify when it’s done, or the run a
> conversion program for all results, without having to name them all. A
> process pinned to the beginning of the SConstruct flow would be useful to
> inform the user of the process and, especially, check some parameters
> instead of forcing halt in the middle of the process, when I’m not in
> office. Some Boolean operations to name files and set parameters would also
> be very useful to run before the construction starts and it would be useful
> to force a file to be processed first, so that I can check the result
> without running all processes.
>

Beginning and end are easy.  For beginning, just put your code at the end
of your SConstruct.  That'll be executed just before the build phase
starts.  For end, use atexit, and use GetBuildFailures() in the exit
handler to check the status of the build.  See
http://www.scons.org/doc/HTML/scons-user/ch09s04.html for an example.


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150807/2f595f45/attachment.html>


More information about the Scons-users mailing list