Skip to content
Closed
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
141 changes: 136 additions & 5 deletions Cargo.lock

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

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ pixi_command_dispatcher = { path = "crates/pixi_command_dispatcher" }
pixi_config = { path = "crates/pixi_config" }
pixi_consts = { path = "crates/pixi_consts" }
pixi_default_versions = { path = "crates/pixi_default_versions" }
pixi_environment = { path = "crates/pixi_environment" }
pixi_git = { path = "crates/pixi_git" }
pixi_glob = { path = "crates/pixi_glob" }
pixi_install_pypi = { path = "crates/pixi_install_pypi" }
pixi_lockfile = { path = "crates/pixi_lockfile" }
pixi_manifest = { path = "crates/pixi_manifest" }
pixi_progress = { path = "crates/pixi_progress" }
pixi_pypi_spec = { path = "crates/pixi_pypi_spec" }
Expand Down Expand Up @@ -249,7 +252,6 @@ clap_complete_nushell = { workspace = true }
console = { workspace = true, features = ["windows-console-colors"] }
console-subscriber = { workspace = true, optional = true }
crossbeam-channel = { workspace = true }
csv = { workspace = true }
dashmap = { workspace = true }
deno_task_shell = { workspace = true }
dialoguer = { workspace = true }
Expand Down Expand Up @@ -277,7 +279,6 @@ uv-install-wheel = { workspace = true }

pep440_rs = { workspace = true }
pep508_rs = { workspace = true }
percent-encoding = { workspace = true }
rattler = { workspace = true, features = ["cli-tools", "indicatif"] }
rattler_conda_types = { workspace = true }
rattler_digest = { workspace = true }
Expand Down Expand Up @@ -306,8 +307,11 @@ pixi_command_dispatcher = { workspace = true }
pixi_config = { workspace = true }
pixi_consts = { workspace = true }
pixi_default_versions = { workspace = true }
pixi_environment = { workspace = true }
pixi_git = { workspace = true }
pixi_glob = { workspace = true }
pixi_install_pypi = { workspace = true }
pixi_lockfile = { workspace = true }
pixi_manifest = { workspace = true, features = ["rattler_lock"] }
pixi_progress = { workspace = true }
pixi_pypi_spec = { workspace = true }
Expand Down Expand Up @@ -349,9 +353,7 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
typed-path = { workspace = true }
url = { workspace = true }
uv-auth = { workspace = true }
uv-cache = { workspace = true }
uv-cache-info = { workspace = true }
uv-client = { workspace = true }
uv-configuration = { workspace = true }
uv-dispatch = { workspace = true }
Expand All @@ -360,7 +362,6 @@ uv-git-types = { workspace = true }
uv-installer = { workspace = true }
uv-normalize = { workspace = true }
uv-python = { workspace = true }
uv-redacted = { workspace = true }
uv-requirements = { workspace = true }
uv-requirements-txt = { workspace = true }
uv-resolver = { workspace = true }
Expand Down
25 changes: 25 additions & 0 deletions crates/pixi_environment/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
name = "pixi_environment"
readme.workspace = true
repository.workspace = true
version = "0.1.0"

[dependencies]
console = { workspace = true }
fs-err = { workspace = true }
human_bytes = { workspace = true }
miette = { workspace = true }
pixi_consts = { workspace = true }
pixi_utils = { workspace = true, default-features = false }
rattler = { workspace = true }
rattler_conda_types = { workspace = true }
rattler_lock = { workspace = true }
serde = { workspace = true }
tabwriter = { workspace = true }
tracing = { workspace = true }
uv-distribution-types = { workspace = true }
uv-installer = { workspace = true }
7 changes: 7 additions & 0 deletions crates/pixi_environment/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub mod conda_metadata;
pub mod list;
mod pypi_prefix;
mod python_status;

pub use pypi_prefix::{ContinuePyPIPrefixUpdate, on_python_interpreter_change};
pub use python_status::PythonStatus;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::path::Path;
use miette::IntoDiagnostic;
use rattler::install::PythonInfo;

use crate::prefix::Prefix;
use pixi_consts::consts;
use pixi_utils::Prefix;
use rattler_lock::{PypiPackageData, PypiPackageEnvironmentData};
use uv_distribution_types::{InstalledDist, Name};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ pub enum PythonStatus {

impl PythonStatus {
/// Determine the [`PythonStatus`] from a [`Transaction`].
pub(crate) fn from_transaction(
transaction: &Transaction<PrefixRecord, RepoDataRecord>,
) -> Self {
pub fn from_transaction(transaction: &Transaction<PrefixRecord, RepoDataRecord>) -> Self {
match (
transaction.current_python_info.as_ref(),
transaction.python_info.as_ref(),
Expand All @@ -45,7 +43,7 @@ impl PythonStatus {

/// Returns the info of the current situation (e.g. after the transaction
/// completed).
pub(crate) fn current_info(&self) -> Option<&PythonInfo> {
pub fn current_info(&self) -> Option<&PythonInfo> {
match self {
PythonStatus::Changed { new, .. }
| PythonStatus::Unchanged(new)
Expand All @@ -56,7 +54,7 @@ impl PythonStatus {

/// Returns the location of the python interpreter relative to the root of
/// the prefix.
pub(crate) fn location(&self) -> Option<&Path> {
pub fn location(&self) -> Option<&Path> {
Some(&self.current_info()?.path)
}
}
Loading
Loading