[Scons-users] SCons upgrade: 2.3.0 -> recent

Mats Wichmann mats at wichmann.us
Fri Mar 24 09:49:02 EDT 2023


On 3/24/23 02:40, Stephan Schwarzmann wrote:
> Hello,
> 
> some years back, I've inherited a project that used SCons. At that
> time, we've used the scons version (<2.3.0) coming via Linux package
> manager (apt).
> 
> One of the SCons updates broke our build system (I think the builds
> abotred with "cyclic dependencies"), so I pinned the SCons version in
> our project to 2.3.0.
> 
> Now we'd like to get rid of python2.7 dependencies and move to a recent
> SCons version.
> 
> 
> Could someone provide some information about the To-Dos, effort and
> pitfalls for an upgrade to a recent version, let's say 4.5.2?
> 
> Does SCons provide backward compatibility, i.e. theoretically our build
> scripts should run with a newer SCons version out-of-the-box?

There are usually two parts.

One is do deal with the Python issues.  You can try running 2to3 on your 
build scripts without the -w flag (so it only shows you what it would do 
and doesn't change the files in place) and see what it proposes. This 
will usually not be a lot - print changing to a function, some changes 
in exception syntax, methods that now return an iterator rather than a list.

The other part is a small number of legacy SCons functions were removed 
that had been deprecated since before v 1.0.  If your build is really 
old it might be using these, there are replacements which have been in 
place since that ancient time.

It *might* be that easy, or it might not.  People here and on the 
discord chat server can help.






More information about the Scons-users mailing list