diff options
author | Jack Lloyd <[email protected]> | 2017-04-12 08:29:13 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-04-12 08:29:13 -0400 |
commit | 426e9868d753a28094c836af21458c527b773c24 (patch) | |
tree | 2270f37ccc693e2ff3e57cc66280ad69e81b09f8 /configure.py | |
parent | 41bb7dbdb9c6cbef60be20938a7ba1194eb63a0d (diff) | |
parent | e94e7c41aaf556753b583c9819ba0bd1a39b8cf4 (diff) |
Merge GH #992 Avoid problem with amalgamation creation under Python3
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/configure.py b/configure.py index addd618a0..741c06b60 100755 --- a/configure.py +++ b/configure.py @@ -828,13 +828,6 @@ class ModuleInfo(InfoObject): logging.error("Module '%s', dep of '%s', does not exist" % ( missing, self.basename)) - def __cmp__(self, other): - if self.basename < other.basename: - return -1 - if self.basename == other.basename: - return 0 - return 1 - class ModulePolicyInfo(InfoObject): def __init__(self, infofile): @@ -2356,7 +2349,7 @@ class AmalgamationGenerator(object): return target def _isas_for_target(self, target): - for mod in sorted(self._modules): + for mod in sorted(self._modules, key=lambda module: module.basename): # Only first module for target is considered. Does this make sense? if self._target_for_module(mod) == target: out = set() @@ -2417,7 +2410,7 @@ class AmalgamationGenerator(object): for target, _ in amalgamation_sources.items(): headers_written[target] = included_in_headers.copy() - for mod in sorted(self._modules): + for mod in sorted(self._modules, key=lambda module: module.basename): tgt = self._target_for_module(mod) for src in sorted(mod.source): with open(src, 'r') as f: |