Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 13 additions & 13 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions crates/pixi_build_backend/src/dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,17 @@ fn convert_nameless_matchspec(spec: NamelessMatchSpec) -> pbt::BinaryPackageSpec
build: spec.build,
build_number: spec.build_number,
file_name: spec.file_name,
extras: spec.extras,
flags: spec.flags,
channel: spec.channel.map(|c| c.base_url.clone().into()),
subdir: spec.subdir,
md5: spec.md5,
sha256: spec.sha256,
url: spec.url,
license: spec.license,
license_family: spec.license_family,
condition: spec.condition,
track_features: spec.track_features,
}
}

Expand Down
17 changes: 15 additions & 2 deletions crates/pixi_build_backend/src/intermediate_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,20 @@ where
build: discovered_output.build_string.clone(),
build_number,
subdir: discovered_output.target_platform,
license: recipe.about.license.map(|l| l.to_string()),
license_family: recipe.about.license_family,
license: recipe.about.license.clone().map(|l| l.to_string()),
license_family: recipe.about.license_family.clone(),
extra_depends: recipe
.requirements
.extras
.iter()
.map(|(group, deps)| {
(
group.clone(),
deps.iter().map(ToString::to_string).collect(),
)
})
.collect(),
flags: recipe.build().flags.clone(),
noarch,
purls: None,
python_site_packages_path: None,
Expand Down Expand Up @@ -786,6 +798,7 @@ where
sandbox_config: None,
exclude_newer: None,
env_isolation: Default::default(),
v3: true,
},
finalized_dependencies: Some(from_build_v1_args_to_finalized_dependencies(
params.build_prefix,
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_build_backend/src/rattler_build_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ pub async fn get_build_output(
solve_strategy: Default::default(),
exclude_newer: None,
env_isolation: Default::default(),
v3: true,
},
finalized_dependencies: None,
finalized_sources: None,
Expand Down
16 changes: 11 additions & 5 deletions crates/pixi_build_backend/src/specs_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,17 @@ fn binary_package_spec_to_package_dependency(
build,
build_number,
file_name,
extras,
flags,
channel,
subdir,
md5,
sha256,
url,
license,
license_family,
condition,
track_features,
} = binary_spec;

// If the version is "*", we treat it as None
Expand All @@ -223,18 +228,18 @@ fn binary_package_spec_to_package_dependency(
build,
build_number,
file_name,
extras: None,
extras,
channel: channel.map(Channel::from_url).map(Arc::new),
subdir,
namespace: None,
md5,
sha256,
url,
license,
condition: None,
track_features: None,
flags: None,
license_family: None,
condition,
track_features,
flags,
license_family,
})
}

Expand Down Expand Up @@ -409,6 +414,7 @@ pub fn from_build_v1_args_to_finalized_dependencies(
.into_iter()
.map(from_build_v1_dependency_to_dependency_info)
.collect(),
extra_depends: Default::default(),
run_exports: run_exports
.map(from_build_v1_run_exports_to_run_exports)
.unwrap_or_default(),
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_build_backend/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ impl RattlerBuild {
sandbox_config: None,
exclude_newer: None,
env_isolation: Default::default(),
v3: true,
},
finalized_dependencies: None,
finalized_cache_dependencies: None,
Expand Down
23 changes: 18 additions & 5 deletions crates/pixi_build_backend/src/traits/package_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,34 @@ impl PackageSpec for pbt::PackageSpec {
build,
build_number,
file_name,
extras,
flags,
channel,
subdir,
md5,
sha256,
url,
license,
license_family,
condition,
track_features,
} = spec;

version == &Some(rattler_conda_types::VersionSpec::Any)
&& build.is_none()
&& build_number.is_none()
&& file_name.is_none()
&& extras.is_none()
&& flags.is_none()
&& channel.is_none()
&& subdir.is_none()
&& md5.is_none()
&& sha256.is_none()
&& url.is_none()
&& license.is_none()
&& license_family.is_none()
&& condition.is_none()
&& track_features.is_none()
}
_ => false,
}
Expand Down Expand Up @@ -120,6 +130,8 @@ impl BinarySpecExt for pbt::BinaryPackageSpec {
build: self.build.clone(),
build_number: self.build_number.clone(),
file_name: self.file_name.clone(),
extras: self.extras.clone(),
flags: self.flags.clone(),
channel: self
.channel
.as_ref()
Expand All @@ -129,12 +141,10 @@ impl BinarySpecExt for pbt::BinaryPackageSpec {
sha256: self.sha256,
url: self.url.clone(),
license: self.license.clone(),
extras: None,
license_family: self.license_family.clone(),
condition: self.condition.clone(),
track_features: self.track_features.clone(),
namespace: None,
condition: None,
track_features: None,
flags: None,
license_family: None,
}
}
}
Expand Down Expand Up @@ -166,6 +176,7 @@ mod tests {
sha256: None,
url: None,
license: None,
..Default::default()
};

let package_spec = pbt::PackageSpec::Binary(binary_spec);
Expand Down Expand Up @@ -199,6 +210,7 @@ mod tests {
sha256: None,
url: None,
license: None,
..Default::default()
};

let package_spec = pbt::PackageSpec::Binary(binary_spec);
Expand Down Expand Up @@ -230,6 +242,7 @@ mod tests {
sha256: None,
url: None,
license: None,
..Default::default()
};

let package_spec = pbt::PackageSpec::Binary(binary_spec);
Expand Down
10 changes: 10 additions & 0 deletions crates/pixi_build_backend/src/variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,34 @@ pub fn can_be_used_as_variant(spec: &pbt::PackageSpec) -> bool {
build,
build_number,
file_name,
extras,
flags,
channel,
subdir,
md5,
sha256,
url,
license,
license_family,
condition,
track_features,
} = spec;

version == &Some(VersionSpec::Any)
&& build.is_none()
&& build_number.is_none()
&& file_name.is_none()
&& extras.is_none()
&& flags.is_none()
&& channel.is_none()
&& subdir.is_none()
&& md5.is_none()
&& sha256.is_none()
&& url.is_none()
&& license.is_none()
&& license_family.is_none()
&& condition.is_none()
&& track_features.is_none()
}
_ => false,
}
Expand Down
Loading
Loading