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

feat: add new pixi-build-backend #15

Merged
merged 8 commits into from
Nov 22, 2024
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
353 changes: 171 additions & 182 deletions Cargo.lock

Large diffs are not rendered by default.

50 changes: 10 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ clap-verbosity-flag = "2.2.1"
tracing-subscriber = "0.3.18"
serde_yaml = "0.9.33"
serde = "1.0"
indexmap = "2.6.0"
minijinja = "2.3.0"

parking_lot = "0.12.3"
Expand All @@ -28,40 +29,16 @@ jsonrpc-stdio-server = "18.0.0"
jsonrpc-http-server = "18.0.0"
jsonrpc-core = "18.0.0"

url = "2.5.3"

rattler-build = { git = "https://github.com/nichmor/rattler-build", branch = "feat/pixi-build", default-features = false }
# rattler_conda_types = "0.28.2"
rattler_package_streaming = "0.22.10"
# rattler_virtual_packages = "1.1.7"

file_url = "0.1.4"
rattler = { version = "0.28.1", default-features = false }
rattler_cache = { version = "0.2.9", default-features = false }
rattler_conda_types = { version = "0.29.1", default-features = false }
rattler_digest = { version = "1.0.3", default-features = false }
rattler_lock = { version = "0.22.30", default-features = false }
rattler_networking = { version = "0.21.5", default-features = false, features = [
"google-cloud-auth",
] }
rattler_repodata_gateway = { version = "0.21.21", default-features = false }
rattler_shell = { version = "0.22.6", default-features = false }
rattler_solve = { version = "1.2.2", default-features = false }
rattler_virtual_packages = { version = "1.1.9", default-features = false }
rattler_package_streaming = { version = "0.22.14", default-features = false }
rattler_virtual_packages = { version = "1.1.10", default-features = false }
rattler_lock = { version = "0.22.31", default-features = false }

# rattler = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_conda_types = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_digest = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_lock = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_networking = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_package_streaming = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_repodata_gateway = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_shell = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_solve = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
# rattler_virtual_packages = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }

#pixi_build_types = { path = "../pixi-build-branch/crates/pixi_build_types" }
#pixi_consts = { path = "../pixi-build-branch/crates/pixi_consts" }
#pixi_manifest = { path = "../pixi-build-branch/crates/pixi_manifest" }
#pixi_spec = { path = "../pixi-build-branch/crates/pixi_spec" }

pixi_build_types = { git = "https://github.com/prefix-dev/pixi", branch = "feature/pixi-build" }
pixi_consts = { git = "https://github.com/prefix-dev/pixi", branch = "feature/pixi-build" }
Expand All @@ -70,14 +47,7 @@ pixi_spec = { git = "https://github.com/prefix-dev/pixi", branch = "feature/pixi


[patch.crates-io]
file_url = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_conda_types = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_digest = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_lock = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_networking = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_package_streaming = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_repodata_gateway = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_shell = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_solve = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_virtual_packages = { git = "https://github.com/conda/rattler", branch = "feat/pixi-build" }
rattler_conda_types = { git = "https://github.com/conda/rattler", branch = "main"}
rattler_package_streaming = { git = "https://github.com/conda/rattler", branch = "main"}
rattler_virtual_packages = { git = "https://github.com/conda/rattler", branch = "main"}
rattler_lock = { git = "https://github.com/conda/rattler", branch = "main"}
2 changes: 2 additions & 0 deletions crates/pixi-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ serde_yaml = { workspace = true }
serde = { workspace = true, features = ["derive"] }
minijinja = { workspace = true }
itertools = { workspace = true }
url = { workspace = true }
indexmap = { workspace = true }

parking_lot = { workspace = true }

Expand Down
4 changes: 2 additions & 2 deletions crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl CMakeBuildBackend {
.expect("the project manifest must reside in a directory");

// Parse the package name from the manifest
let Some(name) = self.manifest.parsed.project.name.clone() else {
let Some(name) = self.manifest.workspace.workspace.name.clone() else {
miette::bail!("a 'name' field is required in the project manifest");
};
let name = PackageName::from_str(&name).into_diagnostic()?;
Expand Down Expand Up @@ -294,7 +294,7 @@ impl CMakeBuildBackend {
work_directory: &Path,
) -> miette::Result<BuildConfiguration> {
// Parse the package name from the manifest
let Some(name) = self.manifest.parsed.project.name.clone() else {
let Some(name) = self.manifest.workspace.workspace.name.clone() else {
miette::bail!("a 'name' field is required in the project manifest");
};
let name = PackageName::from_str(&name).into_diagnostic()?;
Expand Down
4 changes: 2 additions & 2 deletions crates/pixi-build/src/bin/pixi-build-python/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl PythonBuildBackend {
.expect("the project manifest must reside in a directory");

// Parse the package name from the manifest
let Some(name) = self.manifest.parsed.project.name.clone() else {
let Some(name) = self.manifest.workspace.workspace.name.clone() else {
miette::bail!("a 'name' field is required in the project manifest");
};
let name = PackageName::from_str(&name).into_diagnostic()?;
Expand Down Expand Up @@ -267,7 +267,7 @@ impl PythonBuildBackend {
work_directory: &Path,
) -> miette::Result<BuildConfiguration> {
// Parse the package name from the manifest
let Some(name) = self.manifest.parsed.project.name.clone() else {
let Some(name) = self.manifest.workspace.workspace.name.clone() else {
miette::bail!("a 'name' field is required in the project manifest");
};
let name = PackageName::from_str(&name).into_diagnostic()?;
Expand Down
11 changes: 11 additions & 0 deletions crates/pixi-build/src/bin/pixi-build-rattler-build/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mod rattler_build;

use rattler_build::RattlerBuildBackend;

#[tokio::main]
pub async fn main() {
if let Err(err) = pixi_build_backend::cli::main(RattlerBuildBackend::factory).await {
eprintln!("{err:?}");
std::process::exit(1);
}
}
Loading