Skip to content

Commit

Permalink
fix: print packagedb error during wheel build (#220)
Browse files Browse the repository at this point in the history
Print the potential error from PackageDB during a wheel build.
  • Loading branch information
tdejager authored Feb 15, 2024
1 parent 49475bb commit 6e919da
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,24 @@ impl BuildEnvironment {
package_info.version
);
let artifact_info = package_info.artifacts.first().unwrap();
let (artifact, direct_url_json) = wheel_builder
let result = wheel_builder
.package_db
.get_wheel(artifact_info, Some(wheel_builder))
.await
.expect("could not get artifact");

self.venv.install_wheel(
&artifact,
&UnpackWheelOptions {
direct_url_json,
..Default::default()
},
)?;
.await;
match result {
Ok((wheel, direct_url_json)) => {
self.venv.install_wheel(
&wheel,
&UnpackWheelOptions {
direct_url_json,
..Default::default()
},
)?;
}
Err(e) => {
panic!("could not get artifact: {}", e)
}
}
}
}
Ok(())
Expand Down

0 comments on commit 6e919da

Please sign in to comment.