mortoray  committed 2743f8f

hackisk workaround

  • Participants
  • Parent commits 4c336fc
  • Branches issue2821-inferior

Comments (0)

Files changed (1)

File src/engine/SCons/

     #    self.builder.execute(**kw)
 class BuilderDict(UserDict):
+    # During a copy of this class we shouldn't be updating the environment, otherwise
+    # it becomes impossible to do a non-destructive Clone of the environment...
+    # A copy isn't technically a valid copy either, since now both point to the same
+    # environment
+    copying = False
     """This is a dictionary-like class used by an Environment to hold
     the Builders.  We need to do this because every time someone changes
     the Builders in the Environment's BUILDERS dictionary, we must
         # because it will end up calling our other methods, which will
         # need to point the values in this dictionary to self.env.
         self.env = env
+        self.copying = True
         UserDict.__init__(self, dict)
+        self.copying = False
     def __semi_deepcopy__(self):
         return self.__class__(, self.env)
         UserDict.__setitem__(self, item, val)
-        BuilderWrapper(self.env, val, item)
+        if not self.copying:
+            BuilderWrapper(self.env, val, item)
     def __delitem__(self, item):
         UserDict.__delitem__(self, item)