Skip to content

Commit

Permalink
fix: expose previous python version information (#384)
Browse files Browse the repository at this point in the history
Expose the python information of the previous installation in the
transaction.
  • Loading branch information
baszalmstra authored Oct 18, 2023
1 parent 4327276 commit a70f195
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions crates/rattler/src/install/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ pub struct Transaction<Old, New> {
/// The python version of the target state, or None if python doesnt exist in the environment.
pub python_info: Option<PythonInfo>,

/// The python version of the current state, or None if python didnt exist in the previous
/// environment.
pub current_python_info: Option<PythonInfo>,

/// The target platform of the transaction
pub platform: Platform,
}
Expand Down Expand Up @@ -147,6 +151,7 @@ impl<Old: AsRef<PackageRecord>, New: AsRef<PackageRecord>> Transaction<Old, New>
Ok(Self {
operations,
python_info: desired_python_info,
current_python_info,
platform,
})
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_solve/tests/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ macro_rules! solver_backend_tests {
insta::assert_yaml_snapshot!(solve_real_world::<$T>(vec!["xtensor", "xsimd",]));
}

#[test_log::test]
#[test]
fn test_solve_tensorflow() {
insta::assert_yaml_snapshot!(solve_real_world::<$T>(vec!["tensorflow"]));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/rattler_solve/tests/backends.rs
assertion_line: 530
expression: "solve_real_world::<rattler_solve::resolvo::Solver>(vec![\"tensorflow\"])"
---
- _libgcc_mutex 0.1 conda_forge
Expand Down

0 comments on commit a70f195

Please sign in to comment.