diff --git a/conda-forge.yml b/conda-forge.yml index 2fed925c3..6301732f6 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -6,8 +6,5 @@ github: tooling_branch_name: main provider: linux_ppc64le: travis -conda_pkg_format: 2 azure: store_build_artifacts: true -conda_build: - pkg_format: '2' diff --git a/recipe/conda_forge_ci_setup/build_utils.py b/recipe/conda_forge_ci_setup/build_utils.py index 9633259d3..39621a74c 100644 --- a/recipe/conda_forge_ci_setup/build_utils.py +++ b/recipe/conda_forge_ci_setup/build_utils.py @@ -112,15 +112,24 @@ def maybe_use_dot_conda(feedstock_root): if os.path.exists(os.path.join(feedstock_root, "conda-forge.yml")): with open(os.path.join(feedstock_root, "conda-forge.yml")) as f: repo_config = safe_load(f) - pkg_format = repo_config.get("conda_pkg_format", None) + pkg_format = repo_config.get("conda_build", {}).get("pkg_format", None) if pkg_format is not None: - try: + call([ + "conda", "config", "--env", "--set", + "conda_build.pkg_format", str(pkg_format) + ]) + + # set compression level for v2 format + zlev = repo_config.get( + "conda_build", {} + ).get( + "zstd_compression_level", 16 + ) + if zlev is not None and str(pkg_format) == "2": call([ "conda", "config", "--env", "--set", - "conda_build.pkg_format", str(pkg_format) + "conda_build.zstd_compression_level", str(zlev) ]) - except subprocess.CalledProcessError: - pass @click.command()