On 2020/04/23 4:16, Johan Corveleyn wrote: > Running "gen-make.py --debug" with Python 3 fails with: > > [[[ > Traceback (most recent call last): > File "gen-make.py", line 326, in <module> > main(conf, gentype, skip_depends=skip, other_options=rest.list) > File "gen-make.py", line 73, in main > sorted_targets = list(target_dict.keys()); sorted_targets.sort() > TypeError: '<' not supported between instances of 'ObjectFile' and > 'ObjectFile' > ]]] I'm not sure what should be a sort key in this context, but probably...
[[[ Index: gen-make.py =================================================================== --- gen-make.py (revision 1872433) +++ gen-make.py (working copy) @@ -70,7 +70,7 @@ if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): - sorted_targets = list(target_dict.keys()); sorted_targets.sort() + sorted_targets = sorted(target_dict.keys(), key=lambda x: x.filename) for target in sorted_targets: print(dep_type + ": " + _objinfo(target)) for source in target_dict[target]: ]]] (I didn't check at all, even syntax error) Cheers, -- Yasuhito FUTATSUKI <futat...@poem.co.jp>