def get_g2c_libs(env, final_flags): # XXX:Fix me this ugly piece of code pf = gnu_to_scons_flags(final_flags) pf["LIBS"] = unique(pf["LIBS"]) rtlibs = find_libs_paths(pf["LIBS"], pf["LIBPATH"]) msrtlibs =[] tmpdir = join("build", "g77_runtime") # XXX: clean the path before if os.path.exists(tmpdir): shutil.rmtree(tmpdir) os.makedirs(tmpdir) for i in rtlibs: mslib = gnulib2mslib(i) mslibpath = join(tmpdir, mslib) #print "Copying %s in %s" % (i, mslibpath) shutil.copy(i, mslibpath) msrtlibs.append(mslib) return tmpdir, msrtlibs
def get_g2c_libs(env, final_flags): # XXX:Fix me this ugly piece of code pf = gnu_to_scons_flags(final_flags) pf["LIBS"] = unique(pf["LIBS"]) rtlibs = find_libs_paths(pf["LIBS"], pf["LIBPATH"]) msrtlibs = [] tmpdir = join("build", "g77_runtime") # XXX: clean the path before if os.path.exists(tmpdir): shutil.rmtree(tmpdir) os.makedirs(tmpdir) for i in rtlibs: mslib = gnulib2mslib(i) mslibpath = join(tmpdir, mslib) #print "Copying %s in %s" % (i, mslibpath) shutil.copy(i, mslibpath) msrtlibs.append(mslib) return tmpdir, msrtlibs
def test_basic(self): a = [1, 2, 2, 1] assert unique(a) == [1, 2]
def test_donothing(self): a = [1, 2] b = deepcopy(a) assert unique(b) == a