diff --git a/Cargo.lock b/Cargo.lock index 70da49ea9..e76ed5d90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2457,8 +2457,7 @@ dependencies = [ [[package]] name = "rattler" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10db53a7dbbc0fa4ce8bfdbe6709945d2ef8a70d19733cc25e62c94f391cbe8" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "anyhow", "async-compression", @@ -2559,8 +2558,7 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b44cb3d32b5111e90fd48c9a0a3ea96961d1f8d6f177e99297e85bf0f3c3d8" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "chrono", "fxhash", @@ -2589,8 +2587,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41425907dda64a58cc7cef45e908f095a93da102e1fcc5c1ad39a021169c8a3a" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "blake2", "digest", @@ -2605,8 +2602,7 @@ dependencies = [ [[package]] name = "rattler_macros" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf389d109902ca4f00cc4d0c0465ae396a7b28f30fa37ae2c4478ad454825f4" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "quote", "syn 2.0.39", @@ -2615,8 +2611,7 @@ dependencies = [ [[package]] name = "rattler_networking" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389022c4e41bac2e8e3e4d9dc521a152bafc8965f82315e71c98b075937996f9" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "anyhow", "dirs", @@ -2637,8 +2632,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a6ac4e858ef98a972c468eacf1a154b478ce2597b92b3b0cf0ea8ae370ae9" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "bzip2", "chrono", @@ -2661,8 +2655,7 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86f513a9271af56669a3285252da302f46c8dedf9d3e7d1a1e8fa6803b9982e" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "anyhow", "async-compression", @@ -2700,8 +2693,7 @@ dependencies = [ [[package]] name = "rattler_shell" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92051ac67434dd45f59d389db565576b5d32b4ea20d59435381d4d532c604b6e" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "enum_dispatch", "indexmap 2.1.0", @@ -2718,8 +2710,7 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33463a4dd91559bacaf07b90cbb08cfec55b448604bdefeba054aa279ed7f03d" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "anyhow", "chrono", @@ -2738,8 +2729,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610b336877382209d3bb11e6920b5ee2807c2ed215f982b202f91d675b952b3e" +source = "git+https://github.com/mamba-org/rattler?branch=main#9a3f2cc92a50fec4f6f7c13488441ca4ac15269b" dependencies = [ "cfg-if", "libloading", diff --git a/Cargo.toml b/Cargo.toml index 2f46e55bc..01a3872e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,15 +99,15 @@ pre-build = [ ] [patch.crates-io] -# rattler = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_conda_types = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_digest = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_networking = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_repodata_gateway = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_shell = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_solve = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_virtual_packages = { git = "https://github.com/mamba-org/rattler", branch = "main" } -# rattler_package_streaming = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_conda_types = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_digest = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_networking = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_repodata_gateway = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_shell = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_solve = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_virtual_packages = { git = "https://github.com/mamba-org/rattler", branch = "main" } +rattler_package_streaming = { git = "https://github.com/mamba-org/rattler", branch = "main" } # rattler = { path = "../rattler/crates/rattler" } # rattler_conda_types = { path = "../rattler/crates/rattler_conda_types" } diff --git a/src/main.rs b/src/main.rs index 21784329e..31279b1e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,6 +72,14 @@ struct CommonOpts { /// Output directory for build artifacts. Defaults to `./output`. #[clap(long, env = "CONDA_BLD_PATH")] output_dir: Option, + + /// Enable support for repodata.json.zst + #[clap(long, env = "RATTLER_ZSTD", default_value = "true", hide = true)] + use_zstd: bool, + + /// Enable support for repodata.json.bz2 + #[clap(long, env = "RATTLER_BZ2", default_value = "true", hide = true)] + use_bz2: bool, } #[derive(Parser)] @@ -286,6 +294,8 @@ async fn run_build_from_args(args: BuildOpts, multi_progress: MultiProgress) -> multi_progress_indicator: multi_progress, no_clean: args.keep_build, no_test: args.no_test, + use_zstd: args.common.use_zstd, + use_bz2: args.common.use_bz2, }; let mut subpackages = BTreeMap::new(); @@ -412,6 +422,8 @@ async fn rebuild_from_args(args: RebuildOpts) -> miette::Result<()> { multi_progress_indicator: MultiProgress::new(), no_clean: true, no_test: args.no_test, + use_zstd: args.common.use_zstd, + use_bz2: args.common.use_bz2, }; output diff --git a/src/test.rs b/src/test.rs index f921b0882..9344c12b8 100644 --- a/src/test.rs +++ b/src/test.rs @@ -341,7 +341,7 @@ pub async fn run_test(package_file: &Path, config: &TestConfiguration) -> Result client: AuthenticatedClient::default(), multi_progress_indicator: MultiProgress::new(), no_clean: config.keep_test_prefix, - no_test: false, + ..Default::default() }; tracing::info!("Creating test environment in {:?}", prefix); diff --git a/src/tool_configuration.rs b/src/tool_configuration.rs index be57d0474..f6de879f6 100644 --- a/src/tool_configuration.rs +++ b/src/tool_configuration.rs @@ -19,6 +19,12 @@ pub struct Configuration { /// Whether to skip the test phase pub no_test: bool, + + /// Whether to use zstd + pub use_zstd: bool, + + /// Whether to use bzip2 + pub use_bz2: bool, } impl Default for Configuration { @@ -37,6 +43,8 @@ impl Default for Configuration { ), no_clean: false, no_test: false, + use_zstd: true, + use_bz2: true, } } }