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

Gary Oberbrunner garyo at oberbrunner.com
Wed Sep 26 14:59:54 EDT 2012


On Wed, Sep 26, 2012 at 1:12 PM, Marc Branchaud <marcnarc at xiplink.com> wrote:

> 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().


I suspected there was something "unusual" in your env, and was hoping
it wasn't SCons itself putting it in there.
Glad to hear you found it.

--
Gary


More information about the Scons-users mailing list