Skip to content

Commit

Permalink
fix: tar.gz extracting files without mtime breaking wheel builds
Browse files Browse the repository at this point in the history
resolves gh-118 and secondary issue in gh-108
  • Loading branch information
tanj committed Jun 18, 2021
1 parent 0487bca commit bec3af8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/install.rs
Expand Up @@ -249,6 +249,10 @@ pub fn download_and_install_package(
let tar = GzDecoder::new(&archive_file);
let mut archive = Archive::new(tar);

// Some python archives don't have file create times set which
// breaks wheel builds. Don't preserve mtime fixes this.
archive.set_preserve_mtime(false);

// We iterate over and copy entries instead of running `Archive.unpack`, since
// symlinks in the archive may cause the unpack to break. If this happens, we want
// to continue unpacking the other files.
Expand Down

0 comments on commit bec3af8

Please sign in to comment.