changeset 6205:bd0d8fb7845d

Remove python-2.5'ism. Fixes running GUB using python-2.4 from tools.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Tue, 28 Aug 2012 14:10:40 +0200
parents f4ace7b10c94
children 8021db07ffb8
files gub/tools.py
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/gub/tools.py	Tue Aug 28 09:48:59 2012 +0200
+++ b/gub/tools.py	Tue Aug 28 14:10:40 2012 +0200
@@ -46,22 +46,23 @@
                 # on linux-64, build linux-x86::guile with tools32::guile
                 if (package.settings.target_bits == '32'
                     and package.settings.build_bits == '64'):
-                    package.dependencies = [name.replace ('tools::', 'tools32::')
-                                            if (misc.strip_platform (name) in libs_archmatch
-                                                and 'system::' not in name
-                                                and ('cross/' not in name
-                                                     or 'runtime' in name)) else name
+                    package.dependencies = [(misc.strip_platform (name) in libs_archmatch
+                                             and 'system::' not in name
+                                             and ('cross/' not in name
+                                                  or 'runtime' in name))
+                                            and name.replace ('tools::', 'tools32::') or name
                                             for name in package.dependencies]
             # only keep tools32:: for libraries linked against,
             # do not build tools32::autotools etc
             if (package.settings.target_bits == '32'
                 and package.settings.build_bits == '64'):
-                package.dependencies = ['tools::' + misc.strip_platform (name)
-                                        if (misc.strip_platform (name) not in libs_archmatch
-                                            and misc.strip_name (name, package.platform ()) == 'tools32'
-                                            and 'system::' not in name
-                                            and ('cross/' not in name
-                                                 or 'runtime' in name)) else name
+                package.dependencies = [(misc.strip_platform (name) not in libs_archmatch
+                                         and misc.strip_name (name, package.platform ()) == 'tools32'
+                                         and 'system::' not in name
+                                         and ('cross/' not in name
+                                              or 'runtime' in name))
+                                        and 'tools::' + misc.strip_platform (name)
+                                        or name
                                         for name in package.dependencies]
             return package.dependencies
         package.get_build_dependencies \