mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-18 19:21:46 +00:00
Normalize extras when evaluating PEP 508 markers (#915)
## Summary We always normalize extra names in our requirements (e.g., `cuda12_pip` to `cuda12-pip`), but we weren't normalizing within PEP 508 markers, which meant we ended up comparing `cuda12-pip` (normalized) against `cuda12_pip` (unnormalized). Closes https://github.com/astral-sh/puffin/issues/911.
This commit is contained in:
parent
a99e5e00f2
commit
0374000ec0
3 changed files with 84 additions and 52 deletions
|
|
@ -37,7 +37,7 @@ impl PubGrubDependencies {
|
|||
|
||||
// If the requirement isn't relevant for the current platform, skip it.
|
||||
if let Some(extra) = extra {
|
||||
if !requirement.evaluate_markers(env, &[extra.as_ref()]) {
|
||||
if !requirement.evaluate_markers(env, std::slice::from_ref(extra)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -89,7 +89,7 @@ impl PubGrubDependencies {
|
|||
|
||||
// If the requirement isn't relevant for the current platform, skip it.
|
||||
if let Some(extra) = extra {
|
||||
if !constraint.evaluate_markers(env, &[extra.as_ref()]) {
|
||||
if !constraint.evaluate_markers(env, std::slice::from_ref(extra)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue