[Scons-users] parse error using $()

Noah Hoffman noah.hoffman at gmail.com
Fri Sep 29 19:12:19 EDT 2017


Hi,

I've noticed a change in way that scons parses command strings in
version 3.0 that results in an error. Here's a minimal example (with
python 2.7.11 in a virtualenv):

% cat SConstruct
env = Environment(SHELL='bash')

env.Command(
    target='foo.txt',
    source='SConstruct',
    action='echo $$(pwd) > $TARGET',
)
% pip install 'scons<3.0'
% scons --version
SCons by Steven Knight et al.:
        script: v2.5.1.rel_2.5.1:3735:9dc6cee5c168[MODIFIED],
2016/11/03 14:02:02, by bdbaddog on mongodog
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
% pip install -U scons
% scons --version
SCons by Steven Knight et al.:
        script: v3.0.0.rel_3.0.0:4395:8972f6a2f699[MODIFIED],
2017/09/18 13:28:16, by bdbaddog on ubuntu-16
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [foo.txt] Unbalanced $(/$) in: echo $(pwd) > foo.txt
scons: building terminated because of errors.

I tried various strategies for escaping the dollar signs and
parentheses without success.

Thanks for any help,
Noah


More information about the Scons-users mailing list