fixed: auto_ptr -> unique_ptr
[opensg.git] / Bindings / Python / genLibOrder.py
blob6bc2e56bdfe78c65c4fafcb98eae0d98a22cd313
1 #!/usr/bin/python
3 import libOrder
5 #print "Gen Lib Order \n", libOrder.libInfo
7 orderedLibs = ""
9 done = False
11 i = 0
13 while (True):
15 currentLib = None
17 for (libName, libDep) in libOrder.libInfo.items():
19 # print "N: ", libName
20 # print "D: ", libDep
21 # print "L: ", len(libDep)
24 if libDep != None and len(libDep) == 0:
25 if len(orderedLibs) == 0:
26 orderedLibs = libName
27 else:
28 orderedLibs = orderedLibs + ";" + libName
30 libOrder.libInfo[libName] = None
31 currentLib = libName
32 break
34 if currentLib != None:
35 # print "delete lib ", currentLib
37 del libOrder.libInfo[currentLib]
39 for (libName, libDep) in libOrder.libInfo.items():
40 try:
41 libDep.remove(currentLib)
42 except:
43 continue
44 else:
45 break
47 #orderedLibs = orderedLibs + "]"
48 #print "ORDERED:\n"
50 print orderedLibs