[Scons-users] Correct way to expand path variables

Dirk Bächle tshortik at gmx.de
Mon Oct 14 13:03:21 EDT 2013


Henry,

On 14.10.2013 18:10, Henry Gomersall wrote:

> On 14/10/13 15:35, Gary Oberbrunner wrote:

>> Hi Henry; use env.subst(str, target, source). You may also need to

>> call env.str2nodes.

>

> That doesn't seem to do as expected, though I'm not quite sure whether

> I'm missing something:

>

> In src/SConscript:

> env.AppendUnique(JINJA_TEMPLATE_SEARCHPATH=['#foo', 'bar'])

>

> in the scanner function:

> print env.subst(env['JINJA_TEMPLATE_SEARCHPATH'])

>


please try

print env.subst('$JINJA_TEMPLATE_SEARCHPATH')

instead. Additionally, you might want to have a short look at "7.2.3.
Expanding Values From a Construction Environment: the subst Method" in
the UserGuide...

Regards,

Dirk



More information about the Scons-users mailing list