示例#1
0
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
示例#2
0
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
示例#3
0
 def test_basic(self):
     a = [1, 2, 2, 1]
     assert unique(a) == [1, 2]
示例#4
0
 def test_donothing(self):
     a = [1, 2]
     b = deepcopy(a)
     assert unique(b) == a
示例#5
0
 def test_basic(self):
     a = [1, 2, 2, 1]
     assert unique(a) == [1, 2]
示例#6
0
 def test_donothing(self):
     a = [1, 2]
     b = deepcopy(a)
     assert unique(b) == a