Skip to content

Commit

Permalink
feat: turn wildcards into name-only specs for better variant rendering (
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Dec 6, 2024
1 parent ee8db0e commit 0a44caa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ build:
script: "[ ... script ... ]"
requirements:
build:
- boltons *
- boltons
- "... compiler ..."
host:
- hatchling *
- cmake *
- ninja *
- hatchling
- cmake
- ninja
run:
- foobar ==3.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ source: crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs
expression: reqs
---
build:
- boltons *
- boltons
- "... compiler ..."
host:
- hatchling *
- cmake *
- ninja *
- hatchling
- cmake
- ninja
run:
- foobar ==3.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ build:
script: "[ ... script ... ]"
requirements:
host:
- pip *
- python *
- pip
- python
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ build:
noarch: python
requirements:
host:
- pip *
- python *
- pip
- python
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ build:
noarch: python
requirements:
build:
- boltons *
- boltons
host:
- hatchling *
- pip *
- python *
- hatchling
- pip
- python
run:
- foobar >=3.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ source: crates/pixi-build/src/bin/pixi-build-python/python.rs
expression: reqs
---
build:
- boltons *
- boltons
host:
- hatchling *
- pip *
- python *
- hatchling
- pip
- python
run:
- foobar >=3.2.1
7 changes: 6 additions & 1 deletion crates/pixi-build/src/dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ impl<'a> MatchspecExtractor<'a> {
let nameless_spec = binary
.try_into_nameless_match_spec(self.channel_config)
.into_diagnostic()?;
MatchSpec::from_nameless(nameless_spec, Some(name))
if nameless_spec.version == Some("*".parse().unwrap()) {
// Skip dependencies with wildcard versions.
name.as_normalized().to_string().parse().unwrap()
} else {
MatchSpec::from_nameless(nameless_spec, Some(name))
}
}
};

Expand Down

0 comments on commit 0a44caa

Please sign in to comment.