I have a script (Python) that check if I have the right modules installed and if they are up to date -- at least a certain version. I want to run this script in the scons Configure phase. I tried something like:
print 'Configuring... '
conf = Configure(env)
print 'Checking Python modules ',
ret = conf.TryRun("""#!/usr/bin/env python
print 'ook' # test
import my_script
my_script.run()
""", '.py')
if ret == (0, ''):
print 'Fail'
sys.exit(2)
env = conf.Finish()
But all I get is (0, '')
which means that TryRun failed but I cannot see why it would fail! Any idea as to what I am doing wrong?