当我要复制的路径指向项目目录之外时, Scons Copy
builder 不执行任何操作。有没有办法让它真正做到这一点?下面或多或少是测试用例:
p4_dir = '../../../documents'
def prefix_dir(files, *directory):
if not type(directory) is tuple:
directory = (directory,)
return [os.path.realpath(
os.path.join(*(directory + (f,))).replace('\\', '/')) for f in files]
def p4doc():
for x, y in zip(prefix_dir(p4_goodies, Dir('.').abspath, p4_dir), p4_goodies):
print 'copying to: %s from: %s' % (x, y)
Command(x, y, [Delete("$TARGET"), Copy("$TARGET", "$SOURCE")])
p4doc()
此外,当它复制时,它并没有真正复制它被告知要复制的文件,它会将所有目标交给构建器,它调用此操作......您可以用任何字符串替换命令中的$TARGET
and 。鉴于其中没有双点,所有构建器的源都将被复制。现在这不仅仅是错误的......这在设计上是愚蠢的:|$SOURCE
Copy