[Scons-users] bypass string interpolation (quoting)

Neal Becker ndbecker2 at gmail.com
Fri Jun 10 14:43:57 EDT 2016


Thinking that maybe I need to just use Literal, I tried:

MKLRPATH = [Literal(r'$ORIGIN/' + x for x in MKLPATH.split(':'))]

then setting:
Envirnonment(...
 RPATH=[NDARRAYLIBPATH, BOOSTLIBPATH, MKLRPATH , PYTHON_LIBDIR])

gives:
scons: *** [mkl.cpython-35m-x86_64-linux-gnu.so] TypeError `__str__ returned 
non-string (type generator)' trying to evaluate `${_concat(RPATHPREFIX, 
RPATH, RPATHSUFFIX, __env__)}'

Jason Kenny wrote:

> Hi,
> 
> I set this value in Parts via using env.Literal()
> 
> This should allow the value to be left untouched by SCons subst() engine.
> 
> Jason
> 
> -----Original Message-----
> From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Neal
> Becker
> Sent: Friday, June 10, 2016 1:20 PM
> To: scons-users at scons.org
> Subject: [Scons-users] bypass string interpolation (quoting)
> 
> I need an environment containing
> RPATH=[MKLPATH])
> 
> where MKLPATH = '$ORIGIN/...'
> 
> currently scons chokes on this, because it tries to expand (interpolate)
> the
> $ORIGIN.  I can't figure out how to quote this to bypass the expansion.
> 
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users




More information about the Scons-users mailing list