[Scons-users] Running env.Execute in parallel?
Arvid Rosén
arvid at softube.com
Mon Sep 29 16:09:31 EDT 2014
Thanks Dirk,
Yeah, I guessed that would be the answer.
The problematic part when it comes to dependencies is Mac OS bundles (which are just a bunch of files and directories). It would be great if there was some kind of Node object to represent this. Just adding the directory as a dependency causes a mess, and adding all the individual files have other problems. For example, it is very easy to end up with stray files in your bundle as SCons won’t delete these (as it doesn’t know about them). This could for example happen if you rename a file and rebuild.
Also, some Mac OS tools like codesign use a directory as an input argument. This is also a situation where it would be great to handle the bundle as a target of its own, instead of a bunch of files.
Best Regards,
Arvid
29 sep 2014 kl. 20:50 skrev Dirk Bächle <tshortik at gmx.de>:
> Hi Arvid,
>
> On 29.09.2014 10:43, Arvid Rosén wrote:
>> Hi!
>>
>> I have a large build which ends up with a Mac bundle which needs to be manipulated into several different versions. Handling dependencies turned out to be tricky, so I just execute a python function using env.Command(), and this function uses env.Execute() to call external tools.
>>
>> This process takes some time and would benefit from parallel processing, so my question: Can I use env.Execute() in parallel in some SCons-friendly manner, ideally respecting the num_jobs flag?
> as far as I know, there is no parallel processing done while reading the SConstructs/SConscripts (=Execute() of your commands). So your best bet for decently parallelising things is to:
>
> - wrap your commands up into a Tool/Builder (see http://www.scons.org/wiki/ToolsForFools ),
> - get your dependencies right, and
> - let SCons handle the rest. ;)
>
> If you need help with one of the above steps, let us know please.
>
> Best regards,
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list