build - How do I copy files from project directory to outside project directory? -
scons copy builder doesn't when path want copy to points outside project directory. there way it? below more or less test case:
p4_dir = '../../../documents' def prefix_dir(files, *directory): if not type(directory) tuple: directory = (directory,) return [os.path.realpath( os.path.join(*(directory + (f,))).replace('\\', '/')) f in files] def p4doc(): 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 copies, doesn't copy files it's told copy, takes targets given builder, calls action... can substitute $target , $source in copy command string. given doesn't have double dots in it, builder's sources copied. isn't wrong... stupid design :|
you try install() builder. files copies/installs should scons targets , if they're not, wont copied.
Comments
Post a Comment