[Scons-users] strange File() behaviour

voxspox voxspox at gmx.net
Tue Oct 11 10:22:50 EDT 2016


> What you didn't show in your example was, how you setup the folder 
> structure. I assume you're using "variant_dir="? If yes, what value 
> are you setting it to?

variant_dir = build/FFT/GCC

The summary I want to create is outside this variant_dir. The reports of 
each build/variant_dir are inside.

> How do you schedule the builds in relation to your reports? I mean, 
> how do you ensure that a build is fully completed before creating 
> reports for it?

I put all build output objects (from the respective scons builders) into 
a list and pass it to a function create_summary(target, sources, env) I 
call via Command().

> Finally, if you expect the files at certain places wouldn't it be 
> easier to open them with their absolute path directly, instead of 
> trying to fiddle with File() and Dir()?

I have already a File object, thus it looked easy to me to use this one 
to read another file besides this file with File_obj.get_contents().

Do you suggest to use open(pjoin(dirname(str(node)), 'other_file'))?

regards Knut


More information about the Scons-users mailing list