def this_aq_Lib(Lib): try: X=getlib.fetch_Lib_components([Lib]) Py_Dependencies=X[0] Aq_Dependencies=X[1] Objects=X[2] t1=type('lel') AQ_DONE=[Lib] for D in Aq_Dependencies: if type(D)==t1: F=D.split('\n')#split for i in range(len(F)): F[i]=(F[i])[1:] #remove comment hash for i in F: if i!="\n" and i!='\r\n\r\n' and i!='\n\n' and i!='\r\n' and i!='\r' and i!='': #check if null try: AQ_DONE.index(i) #already added this one except: print'Aquarium Dependency Detected:', i AQ_DONE.append(i) X=i.split('.') Q=getlib.fetch_Lib_components([i]) #here add thing to import def's one by one with x.split('.') for example.lol Py_Dependencies.append((Q[0])[0]) Aq_Dependencies.append((Q[1])[0]) Objects.append((Q[2])[0]) else: pass return Py_Dependencies[0]+Objects[0] except Exception,e: print'Error in Core.lib.aqlib.this_aq_Lib' print 'Fatal Error: ',e raise errors.Prog_Failure
def build_package(payload): # Assembles Blueprint with dependencies and Lib cross-dependencies try: print "Fetching Package" print "" PC = getlib.fetch_Blueprint_components(payload) P_Py_Dependencies = PC[0] P_Aq_Dependencies = PC[1] P_Object = PC[2] Libs_tuple = P_Aq_Dependencies print "Printing Dependency List" for i in Libs_tuple: print "- ", i print "" print "Building Package" try: X = getlib.fetch_Lib_components(Libs_tuple) except Exception as err: print "Exception in Core.lib.makelib.build_package" print "Culprit:", Libs_tuple raise errors.Prog_Failure Py_Dependencies = X[0] for i in P_Py_Dependencies: Py_Dependencies.append(i) Aq_Dependencies = X[1] Objects = X[2] t1 = type("lel") AQ_DONE = [] for i in Libs_tuple: AQ_DONE.append(i) for D in Aq_Dependencies: if type(D) == t1: F = D.split("\n") # split for i in range(len(F)): F[i] = (F[i])[1:] # remove comment hash for i in F: if ( i != "\n" and i != "\r\n\r\n" and i != "\n\n" and i != "\r\n" and i != "\r" and i != "" ): # check if null try: AQ_DONE.index(i) # already added this one except ValueError: print "Dependency Detected:", i AQ_DONE.append(i) Q = getlib.fetch_Lib_components( [i] ) # here add thing to import def's one by one with x.split('.') for example.lol Py_Dependencies.append((Q[0])[0]) Aq_Dependencies.append((Q[1])[0]) Objects.append((Q[2])[0]) else: pass Cf = make_compfile(Py_Dependencies, Objects, P_Object) print "" return Cf except Exception as err: print "Exception in Core.lib.makelib.build_package" print type(err), ":", err raise errors.Prog_Failure