Skip to content

Commit 580faee

Browse files
Merge pull request #127 from tanj/issue118
fix: tar.gz extracting files without mtime breaking wheel builds
2 parents a0f5bb6 + bec3af8 commit 580faee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/install.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ pub fn download_and_install_package(
249249
let tar = GzDecoder::new(&archive_file);
250250
let mut archive = Archive::new(tar);
251251

252+
// Some python archives don't have file create times set which
253+
// breaks wheel builds. Don't preserve mtime fixes this.
254+
archive.set_preserve_mtime(false);
255+
252256
// We iterate over and copy entries instead of running `Archive.unpack`, since
253257
// symlinks in the archive may cause the unpack to break. If this happens, we want
254258
// to continue unpacking the other files.

0 commit comments

Comments
 (0)