Scons Copy
builder doesn't do anything when the path I want to copy to points outside the project directory. Is there any way to get it to actually do it? Below is more or less the test case:
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()
Besides, when it copies, it doesn't really copy the files it's told to copy, it takes all the targets given to the builder, which calls this action... You can substitute $TARGET
and $SOURCE
in the Copy
command with any string. Given it doesn't have double dots in it, all builder's sources will be copied. Now this isn't just wrong... this is stupid by design :|