From b801dc27aceaeed543f91dc7988295021a42e262 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Wed, 25 Nov 2009 11:41:46 +0000 Subject: [PATCH] python scanning: order from chaos: pre-sort the ns3 module dependency graph to improve stability of the result --- bindings/python/ns3modulescan.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/python/ns3modulescan.py b/bindings/python/ns3modulescan.py index 1a2530f29..d6bb26efd 100644 --- a/bindings/python/ns3modulescan.py +++ b/bindings/python/ns3modulescan.py @@ -262,7 +262,11 @@ def ns3_module_scan(top_builddir, pygen_file_name, everything_h, cflags): ## do a topological sort on the modules graph from topsort import topsort graph = [] - for ns3_module_name, (ns3_module_deps, dummy) in ns3_modules.iteritems(): + module_names = ns3_modules.keys() + module_names.sort() + for ns3_module_name in module_names: + ns3_module_deps = list(ns3_modules[ns3_module_name][0]) + ns3_module_deps.sort() for dep in ns3_module_deps: graph.append((dep, ns3_module_name)) sorted_ns3_modules = topsort(graph)