Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ tar = "0.4.38"
tempfile = "3.2.0"
toml = "0.9.11"
toml_edit = "0.24.0"
zip = { version = "6.0.0", default-features = false, features = [
zip = { version = "8.1.0", default-features = false, features = [
"bzip2",
"deflate",
"time",
Expand All @@ -74,7 +74,7 @@ semver = "1.0.22"
target-lexicon = "0.13.3"
indexmap = "2.2.3"
pyproject-toml = { version = "0.13.5", features = ["pep639-glob"] }
python-pkginfo = "0.6.6"
python-pkginfo = "0.6.8"
textwrap = "0.16.1"
ignore = "0.4.20"
itertools = "0.14.0"
Expand Down
1 change: 1 addition & 0 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ fn zip_mtime() -> DateTime {
.and_then(|epoch| {
let epoch: i64 = epoch.parse()?;
let dt = time::OffsetDateTime::from_unix_timestamp(epoch)?;
Comment thread
messense marked this conversation as resolved.
let dt = time::PrimitiveDateTime::new(dt.date(), dt.time());
let dt = DateTime::try_from(dt)?;
Ok(dt)
});
Expand Down
6 changes: 3 additions & 3 deletions tests/common/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::collections::BTreeSet;
use std::io::Read;
use std::path::{Path, PathBuf};
use tar::Archive;
use time::OffsetDateTime;
use time::PrimitiveDateTime;
use zip::ZipArchive;

pub fn copy_dir_recursive(src: &Path, dst: &Path) -> std::io::Result<()> {
Expand Down Expand Up @@ -291,11 +291,11 @@ fn build_wheel_files(package: impl AsRef<Path>, unique_name: &str) -> Result<Zip

pub fn check_wheel_mtimes(
package: impl AsRef<Path>,
expected_mtime: Vec<OffsetDateTime>,
expected_mtime: Vec<PrimitiveDateTime>,
unique_name: &str,
) -> Result<()> {
let mut wheel = build_wheel_files(package, unique_name)?;
let mut mtimes = BTreeSet::<OffsetDateTime>::new();
let mut mtimes = BTreeSet::<PrimitiveDateTime>::new();

for idx in 0..wheel.len() {
let mtime = wheel.by_index(idx)?.last_modified().unwrap().try_into()?;
Expand Down
2 changes: 1 addition & 1 deletion tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ fn pyo3_source_date_epoch() {
unsafe { env::set_var("SOURCE_DATE_EPOCH", "0") };
handle_result(other::check_wheel_mtimes(
"test-crates/pyo3-mixed-include-exclude",
vec![datetime!(1980-01-01 0:00 UTC)],
vec![datetime!(1980-01-01 0:00)],
"pyo3_source_date_epoch",
))
}
Expand Down
Loading