pub fn write_dist_info(
    writer: &mut impl ModuleWriter,
    metadata21: &Metadata21,
    scripts: &HashMap<String, String, impl std::hash::BuildHasher>,
    tags: &[String],
) -> Result<()> {
    let dist_info_dir = metadata21.get_dist_info_dir();

    writer.add_directory(&dist_info_dir)?;

    writer.add_bytes(
        &dist_info_dir.join("METADATA"),
        metadata21.to_file_contents().as_bytes(),
    )?;

    writer.add_bytes(&dist_info_dir.join("WHEEL"), wheel_file(tags).as_bytes())?;

    if !scripts.is_empty() {
        writer.add_bytes(
            &dist_info_dir.join("entry_points.txt"),
            entry_points_txt(scripts).as_bytes(),
        )?;
    }

    Ok(())
}
/// Creates the .dist-info directory and fills it with all metadata files except RECORD
Creates the .dist-info directory and fills it with all metadata files except RECORD
Creates the . dist - info directory and fills it with all metadata files except RECORD
pub fn write_dist_info(
    writer: &mut impl ModuleWriter,
    metadata21: &Metadata21,
    scripts: &HashMap<String, String, impl std::hash::BuildHasher>,
    tags: &[String],
) -> Result<()> {
    let dist_info_dir = metadata21.get_dist_info_dir();
    writer.add_directory(&dist_info_dir)?;
    writer.add_bytes(
        &dist_info_dir.join("METADATA"),
        metadata21.to_file_contents().as_bytes(),
    )?;
    writer.add_bytes(&dist_info_dir.join("WHEEL"), wheel_file(tags).as_bytes())?;
    if !scripts.is_empty() {
        writer.add_bytes(
            &dist_info_dir.join("entry_points.txt"),
            entry_points_txt(scripts).as_bytes(),
        )?;
    }
    Ok(())
}
pub fn write_dist_info ( writer : & mut impl ModuleWriter , metadata21 : & Metadata21 , scripts : & HashMap < String , String , impl std :: hash :: BuildHasher > , tags : & [ String ] , ) -> Result < ( ) > { let dist_info_dir = metadata21 . get_dist_info_dir ( ) ; writer . add_directory ( & dist_info_dir ) ? ; writer . add_bytes ( & dist_info_dir . join ( " " ) , metadata21 . to_file_contents ( ) . as_bytes ( ) , ) ? ; writer . add_bytes ( & dist_info_dir . join ( " " ) , wheel_file ( tags ) . as_bytes ( ) ) ? ; if ! scripts . is_empty ( ) { writer . add_bytes ( & dist_info_dir . join ( " " ) , entry_points_txt ( scripts ) . as_bytes ( ) , ) ? ; } Ok ( ( ) ) }
Creates the .dist-info directory and fills it with all metadata files except RECORD
Creates the . dist - info directory and fills it with all metadata files except RECORD
writer
&mut impl ModuleWriter
metadata21
&Metadata21
scripts
&HashMap<String, String, impl std::hash::BuildHasher>
tags
&[String]
writer
&mut impl ModuleWriter
metadata21
&Metadata21
scripts
&HashMap<String, String, impl std::hash::BuildHasher>
tags
&[String]