SConstruct invalid syntax

Asked by Cloudy on 2011-11-27

running Centos 5.7 x64

when trying to install with
scnons install i am getting this error

/linuxdcpp-1.1.0/SConstruct", line 121

    env['mode'] = 'debug' env.get('debug') else 'release'

                            ^

SyntaxError: invalid syntax

thanks in advance

Question information

Language:
English Edit question
Status:
Answered
For:
LinuxDC++ Edit question
Assignee:
No assignee Edit question
Last query:
2011-11-27
Last reply:
2011-11-28
Sergey Basalaev (sbasalaev) said : #1

This line should be
env['mode'] = 'debug' if env.get('debug') else 'release'

See also at http://bazaar.launchpad.net/~linuxdcpp-team/linuxdcpp/1.1/view/head:/SConstruct#L121

Cloudy (mixalis) said : #2

but why i am getting this error ?? :/

Razzloss (razzloss) said : #3

Because of the ancient Python version that is included in centos? I assume it's 2.4.

It'll probably work if you change the line to
if env.get('debug'):
   env['mode'] = 'debug'
else:
   env['mode'] = 'release'

Or just
env['mode'] = 'debug'
or 'release', depending which build you're making.

--RZ

Cloudy (mixalis) said : #4

thanks a lot RZ
The version of Python at centos is 2.4

But now i got a new error :/

 *** [/usr/local/bin/linuxdcpp] Source `linuxdcpp' not found, needed by target `/usr/local/bin/linuxdcpp'.

Razzloss (razzloss) said : #5

You've run just 'scons' before 'scons install'? If so it is possible that scons/our build script doesn't work with so old python.

--RZ

Can you help with this problem?

Provide an answer of your own, or ask Cloudy for more information if necessary.

To post a message you must log in.