<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px"><div dir="ltr" id="yui_3_16_0_1_1458064379897_4823">I'm looking to customize an environment variable (0.9.0b7) and I'm looking for advice for the best way to tackle it. Creating the virtualenv itself isn't a problem, e.g.:</div><div id="yui_3_16_0_1_1458064379897_6138" dir="ltr"><br></div><div id="yui_3_16_0_1_1458064379897_4898" dir="ltr">steps.ShellCommand(workingdir='foo', command=['virtualenv', 'myvenv']),<br></div><div id="yui_3_16_0_1_1458064379897_4874"><br></div><div id="yui_3_16_0_1_1458064379897_4902">Now my goal is to put the current working directory of the shell (e.g. /builderworkingdir/foo/myvenv) into either <br></div><div id="yui_3_16_0_1_1458064379897_6148">   (a) a property, so that I can set the environment later, or</div><div id="yui_3_16_0_1_1458064379897_6237">   (b) directly modify the environment. <br></div><div id="yui_3_16_0_1_1458064379897_4851"><br></div><div dir="ltr" id="yui_3_16_0_1_1458064379897_6238">The first approach I see is to subclass ShellCommand and override the commandComplete to do something like self.setProperty('myvenv' os.path.join(self.workdir, command[1])). Then on subsequent shell commands, do something like ShellCommand(env={'PYTHONPATH' : Property('myvenv'). <br></div><div id="yui_3_16_0_1_1458064379897_6616" dir="ltr">The second approach is similar to the first, except that I might be able to directly set self.slaveEnvironment['myvenv'] = os.path.join(...)</div><div id="yui_3_16_0_1_1458064379897_6945" dir="ltr">The third approach would be to leverage something like steps.SetPropertyFromCommand("source myvenv", property=PYTHONPATH)</div><div id="yui_3_16_0_1_1458064379897_6929" dir="ltr"><br></div><div id="yui_3_16_0_1_1458064379897_6930" dir="ltr">Does that seem like a fair summary of the options? Is one of these approaches notably better than the others? <br></div><div id="yui_3_16_0_1_1458064379897_6931" dir="ltr"><br></div><div id="yui_3_16_0_1_1458064379897_6932" dir="ltr">On a related note, I've considered typing up couple illustrations of what can be done and submitting them as recipes. Is there a good place to submit recipes? I realize buildbot intentionally avoids including "common" solutions because they aren't common, but it seems like topics like this would be helped by some example scenarios.</div><div id="yui_3_16_0_1_1458064379897_6971" dir="ltr"><br></div><div dir="ltr">Thanks,</div><div id="yui_3_16_0_1_1458064379897_6972" dir="ltr">- Alan<br></div></div></body></html>