From 95792a5c83ee9cc31b24beec4e49e255bcc6f0fd Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 11 Oct 2008 13:32:37 +0000 Subject: 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. --- 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 ad77dee..c02d27a 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 7ea3673..641db9c 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): -- cgit v0.12