Skip to content

Commit

Permalink
input: eliminate some unnecessary env copies
Browse files Browse the repository at this point in the history
  • Loading branch information
jkloetzke committed Aug 2, 2024
1 parent 6955f6a commit 52f4452
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pym/bob/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2259,8 +2259,8 @@ def prepare(self, inputEnv, sandboxEnabled, inputStates, inputSandbox=None,
"__tools" : tools })
env = inputEnv.derive()
for i in self.__varSelf:
env = env.derive({ key : env.substitute(value, "environment::"+key)
for key, value in i.items() })
env.update(( (key, env.substitute(value, "environment::"+key))
for key, value in i.items() ))
states = { n : s.copy() for (n,s) in inputStates.items() }

# update plugin states
Expand Down Expand Up @@ -2327,9 +2327,10 @@ def prepare(self, inputEnv, sandboxEnabled, inputStates, inputSandbox=None,
k : depDiffTools.get(v, v)
for k, v in dep.toolOverride.items() })

thisDepEnv = thisDepEnv.derive(
{ key : env.substitute(value, "depends["+recipe+"].environment["+key+"]")
for key, value in dep.envOverride.items() })
if dep.envOverride:
thisDepEnv = thisDepEnv.derive(
{ key : env.substitute(value, "depends["+recipe+"].environment["+key+"]")
for key, value in dep.envOverride.items() })

r = self.__recipeSet.getRecipe(recipe)
try:
Expand Down

0 comments on commit 52f4452

Please sign in to comment.