From 2fedf8fe667ddd319b0a6afe165f918358569198 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 11 Oct 2008 13:32:37 +0000 Subject: [PATCH] Fix our SCons.Util.CLVar implementation (__add__() and __radd__() methods) so env.{Ap,Pre}pend() work under Python 2.6 when appending strings to $*FLAGS variables. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3672 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 3 +++ src/engine/SCons/Util.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ad77deea..c02d27a6 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -15,6 +15,9 @@ RELEASE 1.1.0 - Thu, 09 Oct 2008 08:33:47 -0700 - Fix label placement by the "scons-time.py func" subcommand when a profile value was close to (or equal to) 0.0. + - Fix env.Append() and env.Prepend()'s ability to add a string to + list-like variables like $CCFLAGS under Python 2.6. + RELEASE 1.X - XXX diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 7ea36732..641db9c7 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1022,6 +1022,10 @@ class CLVar(UserList): """ def __init__(self, seq = []): UserList.__init__(self, Split(seq)) + def __add__(self, other): + return UserList.__add__(self, CLVar(other)) + def __radd__(self, other): + return UserList.__radd__(self, CLVar(other)) def __coerce__(self, other): return (self, CLVar(other)) def __str__(self): -- 2.26.2