[Scons-users] scons 3 print syntax change breaks serf build

Ryan Schmidt scons at ryandesign.com
Wed Sep 27 15:26:44 EDT 2017


Hello, I'm a developer with the MacPorts package management system.

We've noticed [1] that serf 1.3.8 cannot be built with scons 3.0.0. The error is:



  File "/path/to/SConstruct", line 181
    print 'Unknown variables:', ', '.join(unknown.keys())
                             ^
SyntaxError: invalid syntax



There is no problem building serf 1.3.8 with scons 2.5.1, so this is a regression.

It's as if scons 3 is requiring print to be a function as in python 3, instead of a statement as in python 2, although our scons should still be running with python 2.7. (Perhaps our scons is using python 3 inadvertently -- how would we check for that, and correct it?)

Even your own scons 3 documentation [2] shows a sample SConstruct file with print being used as a statement, and this same error occurring as a result!

I'm assuming this change in the way scons expects print to be used is an unintentional bug...


[1] https://trac.macports.org/ticket/54915

[2] http://scons.org/doc/3.0.0/HTML/scons-user/ch08s02.html



More information about the Scons-users mailing list