code: def _copy_sources(self, target, results_dir):
      
      buildroot = get_buildroot()
      source_relative_to = target.address.spec_path
      for source in target.sources_relative_to_buildroot():
        dest = os.path.join(results_dir, os.path.relpath(source, source_relative_to))
        safe_mkdir(os.path.dirname(dest))
        shutil.copyfile(os.path.join(buildroot, source), dest)
docs: Copy sources from a target to a results directory.
  
      :param NodePackage target: A subclass of NodePackage
      :param string results_dir: The results directory