def run(self):
self.mkpath(self.install_dir)
for f in self.data_files:
dir, files = f
dir = util.convert_path(dir)
if not os.path.isabs(dir):
dir = os.path.join(self.install_dir, dir)
elif self.root:
dir = change_root(self.root, dir)
self.mkpath(dir)
if not files:
self.outfiles.append(dir)
else:
for file in files:
if isinstance(file, six.string_types):
infile = file
outfile = os.path.join(dir,
os.path.basename(file))
else:
infile, outfile = file
infile = util.convert_path(infile)
outfile = util.convert_path(outfile)
if os.path.sep not in outfile:
outfile = os.path.join(dir,
outfile)
self.copy_file(infile, outfile)
self.outfiles.append(outfile)
评论列表
文章目录