summaryrefslogtreecommitdiff
path: root/engine/SCons/Util.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:37:46 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:37:46 +0100
commitd54066e296261089c45863f5751e5ec49f4a801e (patch)
tree2668618d1428e6f636d13ff98ee95c79144899ed /engine/SCons/Util.py
parent5ed7f9cf4e33468b3b75e057db461b30a81febe4 (diff)
parentcd2ab5002aa2359575088bbc3183a9a91cc50c31 (diff)
Update upstream source from tag 'upstream/3.0.1'
Update to upstream version '3.0.1' with Debian dir 34db0131ff56138f3e3a8cd736b32630827891ce
Diffstat (limited to 'engine/SCons/Util.py')
-rw-r--r--engine/SCons/Util.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/engine/SCons/Util.py b/engine/SCons/Util.py
index 2a1604b..c9aa2b5 100644
--- a/engine/SCons/Util.py
+++ b/engine/SCons/Util.py
@@ -24,7 +24,7 @@ Various utility functions go here.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Util.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Util.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
import os
import sys
@@ -481,10 +481,7 @@ def to_String_for_subst(s,
if isinstance(s, BaseStringTypes):
return s
elif isinstance(s, SequenceTypes):
- l = []
- for e in s:
- l.append(to_String_for_subst(e))
- return ' '.join( s )
+ return ' '.join([to_String_for_subst(e) for e in s])
elif isinstance(s, UserString):
# s.data can only be either a unicode or a regular
# string. Please see the UserString initializer.
@@ -1622,6 +1619,17 @@ def to_str (s):
return s
return str (s, 'utf-8')
+
+
+# No cmp in py3, so we'll define it.
+def cmp(a, b):
+ """
+ Define cmp because it's no longer available in python3
+ Works under python 2 as well
+ """
+ return (a > b) - (a < b)
+
+
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil