-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: proper archspec detection using archspec-rs (#584)
Implements proper archspec detection using https://github.com/prefix-dev/archspec-rs which is a port of https://github.com/archspec/archspec used by `conda`. This opens the doors to build and use architecture specific packages. We loose the `__archspec` virtual package for wasm targets because the archspec standard does not describe these targets. I set the default archspec for `osx-arm64` to `m1` because I think thats greatest common denominator for arm based chips on mac. I also added a subcommand to rattler-bin to print the detected virtual packages. On my windows machine: ``` > cargo run -- virtual-packages __win=0=0 __cuda=12.3=0 __archspec=1=skylake ``` Under WSL: ``` > cargo run -- virtual-packages __unix=0=0 __linux=5.15.146.1=0 __glibc=2.35=0 __cuda=12.3=0 __archspec=1=skylake ``` @wolfv Would you be able to run this on you mac and report the output? @ruben-arts Can you try on your machines as well? You can verify that this is the same as conda by creating an environment with `conda` and `archspec` and running `conda info`.
- Loading branch information
1 parent
2a05201
commit 056f08b
Showing
6 changed files
with
93 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pub mod create; | ||
pub mod virtual_packages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use rattler_conda_types::GenericVirtualPackage; | ||
|
||
#[derive(Debug, clap::Parser)] | ||
pub struct Opt {} | ||
|
||
pub fn virtual_packages(_opt: Opt) -> anyhow::Result<()> { | ||
let virtual_packages = rattler_virtual_packages::VirtualPackage::current()?; | ||
for package in virtual_packages { | ||
println!("{}", GenericVirtualPackage::from(package.clone())); | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters