From bec3af882f907920540d89d63cc26c1f647b73cf Mon Sep 17 00:00:00 2001 From: John te Bokkel Date: Thu, 17 Jun 2021 20:52:11 -0700 Subject: [PATCH] fix: tar.gz extracting files without mtime breaking wheel builds resolves gh-118 and secondary issue in gh-108 --- src/install.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/install.rs b/src/install.rs index 4e12dbc..d6c80f8 100644 --- a/src/install.rs +++ b/src/install.rs @@ -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.