python scanning: order from chaos: pre-sort the ns3 module dependency graph to improve stability of the result
--- a/bindings/python/ns3modulescan.py Wed Nov 25 10:51:37 2009 +0000
+++ b/bindings/python/ns3modulescan.py Wed Nov 25 11:41:46 2009 +0000
@@ -262,7 +262,11 @@
## 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)