Skip to content

Commit

Permalink
fix: protocol update (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra authored Jan 17, 2025
1 parent 8db30a4 commit a975308
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ rattler_conda_types = { version = "0.29.9", default-features = false }
rattler_package_streaming = { version = "0.22.22", default-features = false }
rattler_virtual_packages = { version = "1.1.17", default-features = false }

pixi_build_types = { git = "https://github.com/prefix-dev/pixi", branch = "main" }
pixi_consts = { git = "https://github.com/prefix-dev/pixi", branch = "main" }
pixi_manifest = { git = "https://github.com/prefix-dev/pixi", branch = "main" }
pixi_spec = { git = "https://github.com/prefix-dev/pixi", branch = "main" }
pixi_build_type_conversions = { git = "https://github.com/prefix-dev/pixi", branch = "main" }
pixi_build_types = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" }
pixi_consts = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" }
pixi_manifest = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" }
pixi_spec = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" }
pixi_build_type_conversions = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" }
6 changes: 4 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 @@ -213,8 +213,10 @@ impl CMakeBuildBackend {
) -> miette::Result<Recipe> {
// Parse the package name from the manifest
let project_model = &self.project_model;

let name = PackageName::from_str(&project_model.name).into_diagnostic()?;
let version = self.project_model.version.clone().ok_or_else(|| {
miette::miette!("a version is missing from the package but it is required")
})?;

let noarch_type = NoArchType::none();

Expand All @@ -236,7 +238,7 @@ impl CMakeBuildBackend {
schema_version: 1,
context: Default::default(),
package: Package {
version: self.project_model.version.clone().into(),
version: version.into(),
name,
},
cache: None,
Expand Down
4 changes: 3 additions & 1 deletion crates/pixi-build/src/bin/pixi-build-python/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ impl PythonBuildBackend {
) -> miette::Result<Recipe> {
// Parse the package name and version from the manifest
let name = PackageName::from_str(&self.project_model.name).into_diagnostic()?;
let version = self.project_model.version.clone();
let version = self.project_model.version.clone().ok_or_else(|| {
miette::miette!("a version is missing from the package but it is required")
})?;

// Determine whether the package should be built as a noarch package or as a
// generic package.
Expand Down

0 comments on commit a975308

Please sign in to comment.