[Scons-users] Running env.Execute in parallel?

Gary Oberbrunner garyo at oberbrunner.com
Mon Sep 29 20:52:47 EDT 2014


On Mon, Sep 29, 2014 at 5:09 PM, Arvid Rosén <arvid at softube.com> wrote:
> 29 sep 2014 kl. 23:01 skrev Dirk Bächle <tshortik at gmx.de>:
>>>
>>> On 29.09.2014 22:09, Arvid Rosén wrote:
>>>> 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.
>>> I'm no Mac user and don't have any experience with this system, so I can't really add anything useful to the "OS bundles" part. Maybe someone else can join the discussion, and give helpful advice?
>>>
>>
>> Hmm, I thought about this problem in the back of my head...have you tried (or considered) using a pseudo-Builder? One could perhaps compile the "Bundle" (a sort of self-contained folder, as I understood it) in a two-stage process: building the required files first, and then using the Install() command to put them into the final bundle folder, or its subdirectories.
>> Just as an idea…
>
> Hi again,
>
> That is kind of what I do now. But imagine the next step in the build, when you want to run other builders on the ”Bundle”, which can add, change, or even rename some file in the bundle. That is when it gets complicated. I have thought of zipping the whole thing and then only write builders that work on that zip file (and temporary unzip it if needed). I think that would work, but it just feels a bit awkward.

Hi Arvid.  We build Mac bundles (directories) in my day job; most
things actually do work with a Dir node as a target (don't forget to
use TargetFactory=Dir) or source. True, some things still aren't
perfect, and the problem of not deleting unknown files is something we
face too. A Dir implicitly depends on all of its files, including the
ones there at the start of the build, which is sometimes not the right
assumption.

-- Gary


More information about the Scons-users mailing list