[Scons-users] Problems with SCons parallel build

Evan Driscoll driscoll at cs.wisc.edu
Fri Mar 21 17:20:01 EDT 2014


On 2014-03-21 16:04, Gary Oberbrunner wrote:

> "cd" in a command is OK, since that runs in a subprocess. But a

> python chdir() would be very bad, since the whole process has only one

> current dir, so you're changing it for all threads if you do that.


Don't forget chdir arguments to builders too.

In other words, when using a parallel build:

1) Command("cd blah && whatever") is OK
2) AnyBuilder(..., chdir=1) or AnyBuilder(..., chdir='blah') is NOT
3) os.chdir() from a Python function called by a builder is NOT

Evan



More information about the Scons-users mailing list