diff --git a/conda_smithy/data/conda-forge.json b/conda_smithy/data/conda-forge.json index 78795a921..d2015bf4f 100644 --- a/conda_smithy/data/conda-forge.json +++ b/conda_smithy/data/conda-forge.json @@ -1777,7 +1777,7 @@ } ], "default": "micromamba", - "description": "Use this option to choose which tool is used to provision the tooling in your\nfeedstock. Defaults to micromamba.\n\nIf conda or mamba are chosen, the latest Miniforge will be used to\nprovision the base environment. If micromamba is chosen, Miniforge\nis not involved; the environment is created directly by micromamba.\n\nNote: micromamba is only used on macOS and Windows for now.\nOn Linux, mamba (as provided in the Docker images) will still be used\neven if micromamba is chosen.", + "description": "Use this option to choose which tool is used to provision the tooling in your\nfeedstock. Defaults to micromamba.\n\nIf conda or mamba are chosen, the latest Miniforge will be used to\nprovision the base environment. If micromamba is chosen, Miniforge\nis not involved; the environment is created directly by micromamba.", "title": "Conda Install Tool" }, "conda_forge_output_validation": { diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index d6415bb7d..c912abc5c 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -637,10 +637,6 @@ class ConfigModel(BaseModel): If conda or mamba are chosen, the latest Miniforge will be used to provision the base environment. If micromamba is chosen, Miniforge is not involved; the environment is created directly by micromamba. - - Note: micromamba is only used on macOS and Windows for now. - On Linux, mamba (as provided in the Docker images) will still be used - even if micromamba is chosen. """ ), ) diff --git a/conda_smithy/templates/build_steps.sh.tmpl b/conda_smithy/templates/build_steps.sh.tmpl index dc71d3c5d..aa5fb904b 100644 --- a/conda_smithy/templates/build_steps.sh.tmpl +++ b/conda_smithy/templates/build_steps.sh.tmpl @@ -33,6 +33,15 @@ solver: {{ conda_solver }} {%- endif %} CONDARC + +{%- if conda_install_tool == "micromamba" %} +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }} +{%- endif %} + {%- if conda_build_tool == "mambabuild" %} {%- set BUILD_CMD="conda-mambabuild" %} {%- elif conda_build_tool == "conda-build+conda-libmamba-solver" %} @@ -47,12 +56,10 @@ CONDARC {%- if conda_solver == "libmamba" %} export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 {%- endif %} -{%- if conda_install_tool == "micromamba" %} -{%- set conda_install_tool = "mamba" %} -{%- endif %} - +{%- if conda_install_tool in ("conda", "mamba") %} {{ conda_install_tool }} install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }} +{%- endif %} {%- if conda_install_tool == "mamba" and (conda_build_tool_deps != "" or conda_install_tool_deps != "") %} {{ conda_install_tool }} update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup_update) }} diff --git a/news/gh2075-micromamba-install-tool.rst b/news/gh2075-micromamba-install-tool.rst index 5df087290..0994e7ef1 100644 --- a/news/gh2075-micromamba-install-tool.rst +++ b/news/gh2075-micromamba-install-tool.rst @@ -1,6 +1,6 @@ **Added:** -* Added ``micromamba`` as the default install tool on macOS and Windows. (#2075) +* Added ``micromamba`` as the default install tool on Linux, macOS and Windows. (#2075, #2097) **Changed:**