def install_dart_library_atom(self, atom): package_name = atom['name'] name = sanitize(package_name) library = model.DartLibrary(name, package_name) base = self.dest('dart', name) self._copy_files(atom['sources'], atom['root'], base) for dep in atom['deps']: library.deps.append('//dart/' + sanitize(dep)) for dep in atom['fidl_deps']: san_dep = sanitize(dep) library.deps.append('//fidl/%s:%s_dart' % (san_dep, san_dep)) for dep in atom['third_party_deps']: name = dep['name'] library.deps.append('@vendor_%s//:%s' % (name, name)) self.add_dart_vendor_package(name, dep['version']) self.write_file(os.path.join(base, 'BUILD'), 'dart_library', library)
def install_dart_library_atom(self, atom): if self.is_overlay: return name = sanitize(atom.id.name) package_name = atom.tags['package_name'] library = model.DartLibrary(name, package_name) base = self.dest('dart', name) for file in atom.files: dest = self.make_dir(os.path.join(base, file.destination)) shutil.copy2(file.source, dest) for dep in atom.deps: library.deps.append('//dart/' + sanitize(dep.name)) for tag, value in atom.tags.iteritems(): if not tag.startswith('3p:'): continue name = tag.split(':', 1)[1] library.deps.append('@vendor_%s//:%s' % (name, name)) self.add_dart_vendor_package(name, value) self.write_file(os.path.join(base, 'BUILD'), 'dart_library', library)