Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start wrapping everything necessary for shell activation for py-rattler #298

Merged
merged 1 commit into from
Sep 6, 2023
Merged
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
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ pub use match_spec::parse::ParseMatchSpecError;
pub use match_spec::{MatchSpec, NamelessMatchSpec};
pub use no_arch_type::{NoArchKind, NoArchType};
pub use package_name::{InvalidPackageNameError, PackageName};
pub use platform::{ParsePlatformError, Platform};
pub use platform::{Arch, ParseArchError, ParsePlatformError, Platform};
pub use prefix_record::PrefixRecord;
pub use repo_data::patches::{PackageRecordPatch, PatchInstructions, RepoDataPatch};
pub use repo_data::{ChannelInfo, ConvertSubdirError, PackageRecord, RepoData};
3 changes: 3 additions & 0 deletions crates/rattler_conda_types/src/platform.rs
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ impl Ord for Platform {
}

/// Known architectures supported by Conda.
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum Arch {
X86,
@@ -356,9 +357,11 @@ impl Arch {
}
}

/// An error that can occur when parsing an arch from a string.
#[derive(Debug, Error, Clone, Eq, PartialEq)]
#[error("'{string}' is not a known arch")]
pub struct ParseArchError {
/// The arch string that could not be parsed.
pub string: String,
}

127 changes: 118 additions & 9 deletions py-rattler/Cargo.lock

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

1 change: 1 addition & 0 deletions py-rattler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
rattler_conda_types = { path = "../crates/rattler_conda_types", default-features = false }
rattler_shell = { path = "../crates/rattler_shell", default-features = false }

pyo3 = { version = "0.19", features = [
"abi3-py38",
3 changes: 3 additions & 0 deletions py-rattler/pyproject.toml
Original file line number Diff line number Diff line change
@@ -21,3 +21,6 @@ license = "BSD-3-Clause"

[tool.maturin]
features = ["pyo3/extension-module"]

[tool.ruff]
line-length = 120
3 changes: 3 additions & 0 deletions py-rattler/rattler/platform/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from rattler.platform.platform import Platform

__all__ = ["Platform"]
Loading