[Scons-users] Clone error upgrading from 1.2.0 to 2.2.0

Marc Branchaud marcnarc at xiplink.com
Wed Sep 26 13:12:31 EDT 2012

On 12-09-25 06:20 PM, Marc Branchaud wrote:

> Hi all,


> I'm attempting to upgrade our SCons from 1.2.0.r3842 to 2.2.0, and I'm

> getting an error on a call to env.Clone(): "TypeError: cannot semi_deepcopy a

> BuilderDict".

Found the problem -- we were doing something dumb.

We want to store, in the environment, a dict of "tokens" whose values get
substituted into files that we install/copy them to various places. Some of
these tokens are already defined in the environment itself -- e.g.
env['VERSION']. We wanted to make sure our tokens dict has all of these, so
we lazily initialized the tokens dict like this:

env['TOKENS'] = env.Dictionary().copy()

This naturally includes a shallow copy of the env['BUILDERS'], which is why
cloning the env afterwards failed.

Things are fine if we don't copy all of env.Dictionary().


More information about the Scons-users mailing list