From 328f4251e2df17b7a4884d3435fdd92ae7a586d0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Wed, 12 Mar 2025 17:42:27 +0100 Subject: [PATCH 01/31] Define 'default' extra env configured to auto-activate --- Miniforge3/construct.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 78b7f50f..9aad41bb 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -15,7 +15,12 @@ channels: # - https://conda.anaconda.org/conda-forge - conda-forge -write_condarc: True +# Note: this needs https://github.com/conda/conda/pull/14666 for 'default_env' +condarc: | + channels: + - conda-forge + default_env: default + # keep pkgs for space-saving implications for hardlinks when create new environments # and keep the same with Miniconda keep_pkgs: True @@ -42,6 +47,12 @@ specs: - pip - miniforge_console_shortcut 1.* # [win] +extra_envs: + default: + specs: + - python 3.12.* + - pip + virtual_specs: - __glibc >=2.17 # [linux] - __osx >=10.13 # [osx] From ec451b039a74fe2959c6e497214b5dca0e80f7fc Mon Sep 17 00:00:00 2001 From: jaimergp Date: Thu, 13 Mar 2025 17:05:19 +0100 Subject: [PATCH 02/31] Test default env --- scripts/test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index 6bc054c8..5322a3d4 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -71,6 +71,7 @@ EOF echo "***** Print conda info *****" conda info conda list + conda info --envs fi echo "+ Mamba does not warn (check that there is no warning on stderr) and returns exit code 0" @@ -106,6 +107,13 @@ python -c "import platform; print(platform.system())" python -c "import platform; print(platform.machine())" python -c "import platform; print(platform.release())" +echo "***** Check default environment *****" +conda activate default +echo "$CONDA_PREFIX" +which python +python -V +conda deactivate + echo "***** Done: Testing installer *****" echo "***** Testing the usage of mamba main commands *****" From ea2be22ee9e6da59c32aac6b4ffd2581ce8af85a Mon Sep 17 00:00:00 2001 From: jaimergp Date: Thu, 13 Mar 2025 17:25:14 +0100 Subject: [PATCH 03/31] Force Intel mac --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b587f0f..29038c0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: TARGET_PLATFORM: osx-arm64 OS_NAME: "MacOSX" - - os: macos-latest + - os: macos-13 # Force Intel ARCH: x86_64 TARGET_PLATFORM: osx-64 OS_NAME: "MacOSX" From 52901f21acab1c61d461c833f13ff65eb53857ee Mon Sep 17 00:00:00 2001 From: jaimergp Date: Thu, 13 Mar 2025 17:30:08 +0100 Subject: [PATCH 04/31] Use type instead of which --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 5322a3d4..33552afd 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -110,7 +110,7 @@ python -c "import platform; print(platform.release())" echo "***** Check default environment *****" conda activate default echo "$CONDA_PREFIX" -which python +type python python -V conda deactivate From e3c152983156dd8ac13e668a715046f6b96d8139 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 11:28:38 +0100 Subject: [PATCH 05/31] test as nameless --- scripts/test.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 33552afd..0146efd3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -108,12 +108,25 @@ python -c "import platform; print(platform.machine())" python -c "import platform; print(platform.release())" echo "***** Check default environment *****" +conda activate +default_prefix_nameless="$CONDA_PREFIX" +echo "default_prefix=$default_prefix" +default_python_nameless="$(type python)" +echo "default_python=$default_python" +python -V +conda deactivate + conda activate default -echo "$CONDA_PREFIX" -type python +default_prefix="$CONDA_PREFIX" +echo "default_prefix=$default_prefix" +default_python="$(type python)" +echo "default_python=$default_python" python -V conda deactivate +test "$default_prefix_nameless" = "$default_prefix" +test "$default_python_nameless" = "$default_python" + echo "***** Done: Testing installer *****" echo "***** Testing the usage of mamba main commands *****" From f6bcf45c1b6b65360295c3cd2b26132d0f5800f8 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 12:06:04 +0100 Subject: [PATCH 06/31] Use conda from #14678 --- Miniforge3/construct.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 9aad41bb..d7806298 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -13,6 +13,7 @@ channels: # specifying the channel with the full URL adds two channels # when the end user adds the channel without the full URL # - https://conda.anaconda.org/conda-forge + - conda-canary/label/conda-conda-pr-14678 - conda-forge # Note: this needs https://github.com/conda/conda/pull/14666 for 'default_env' From 896753e18bd506642d634c3d275d242a68bfeaa4 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 15:50:26 +0100 Subject: [PATCH 07/31] do not be so strict about versions --- Miniforge3/construct.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index d7806298..2b963d7b 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -42,8 +42,8 @@ user_requested_specs: specs: - python 3.12.* - - conda {{ version.split("-")[0] }} - - mamba {{ mamba_version }} + - conda {{ version.split("-")[0] }}.* + - mamba {{ mamba_version }}.* - conda-libmamba-solver {{ conda_libmamba_solver_version }} - pip - miniforge_console_shortcut 1.* # [win] From 3c3ad4f77be3df9317447b51086ae050e3acd1ca Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 15:59:23 +0100 Subject: [PATCH 08/31] activate conda base explicitly to have mamba in PATH --- scripts/test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 0146efd3..db786584 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -110,9 +110,9 @@ python -c "import platform; print(platform.release())" echo "***** Check default environment *****" conda activate default_prefix_nameless="$CONDA_PREFIX" -echo "default_prefix=$default_prefix" +echo "default_prefix_nameless=$default_prefix_nameless" default_python_nameless="$(type python)" -echo "default_python=$default_python" +echo "default_python_nameless=$default_python_nameless" python -V conda deactivate @@ -131,6 +131,8 @@ echo "***** Done: Testing installer *****" echo "***** Testing the usage of mamba main commands *****" +conda activate base + echo "***** Initialize the current session for mamba *****" eval "$(mamba shell hook --shell bash)" From b6e7eaecceb5f5d7f59d307c23226129aa0f6972 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:07:58 +0100 Subject: [PATCH 09/31] Activate base explicitly --- scripts/test.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index db786584..c61a3aa0 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,7 +29,7 @@ if [[ "$(uname)" == MINGW* ]]; then echo "***** Setup conda *****" # Workaround a conda bug where it uses Unix style separators, but MinGW doesn't understand them - export PATH=$CONDA_PATH/Library/bin:$PATH + export PATH=$CONDA_PATH/Library/bin:$CONDA_PATH/condabin:$PATH # shellcheck disable=SC1091 source "${CONDA_PATH}/Scripts/activate" conda.exe config --set show_channel_urls true @@ -66,7 +66,7 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - source "${CONDA_PATH}/bin/activate" + eval "$("${CONDA_PATH}/bin/python" -m conda shell.posix activate base)" echo "***** Print conda info *****" conda info @@ -131,8 +131,6 @@ echo "***** Done: Testing installer *****" echo "***** Testing the usage of mamba main commands *****" -conda activate base - echo "***** Initialize the current session for mamba *****" eval "$(mamba shell hook --shell bash)" From 88ed77b463e1fc0190de082d14161081644e3018 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:11:16 +0100 Subject: [PATCH 10/31] Use hook first --- scripts/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index c61a3aa0..4beb9f32 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -66,7 +66,8 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - eval "$("${CONDA_PATH}/bin/python" -m conda shell.posix activate base)" + eval "$("${CONDA_PATH}/bin/python" -m conda shell.posix hook)" + conda activate base echo "***** Print conda info *****" conda info From ded128ec3193d5a040cbda667bd4a95ed543cbf9 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:19:32 +0100 Subject: [PATCH 11/31] config --show-sources --- scripts/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 4beb9f32..5f79cc29 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,7 +29,7 @@ if [[ "$(uname)" == MINGW* ]]; then echo "***** Setup conda *****" # Workaround a conda bug where it uses Unix style separators, but MinGW doesn't understand them - export PATH=$CONDA_PATH/Library/bin:$CONDA_PATH/condabin:$PATH + export PATH=$CONDA_PATH/Library/bin:$PATH # shellcheck disable=SC1091 source "${CONDA_PATH}/Scripts/activate" conda.exe config --set show_channel_urls true @@ -73,6 +73,7 @@ EOF conda info conda list conda info --envs + conda config --show-sources fi echo "+ Mamba does not warn (check that there is no warning on stderr) and returns exit code 0" From 81a0a038c84f8e277e43c8d53196489df0e03e91 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:23:29 +0100 Subject: [PATCH 12/31] unset CONDA_DEFAULT_ENV --- scripts/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index 5f79cc29..6b64124d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,6 +2,8 @@ set -ex +unset CONDA_DEFAULT_ENV + echo "***** Start: Testing Miniforge installer *****" CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}" @@ -37,6 +39,8 @@ if [[ "$(uname)" == MINGW* ]]; then echo "***** Print conda info *****" conda.exe info conda.exe list + conda.exe info --envs + conda.exe config --show-sources echo "***** Check if we are bundling packages from msys2 or defaults *****" conda.exe list | grep defaults && exit 1 From b65476c782f9c253fc7ee3c5d921bfd3f70dfc5e Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:27:23 +0100 Subject: [PATCH 13/31] deactivate first? --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 6b64124d..21d1f544 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,8 +2,6 @@ set -ex -unset CONDA_DEFAULT_ENV - echo "***** Start: Testing Miniforge installer *****" CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}" @@ -114,6 +112,8 @@ python -c "import platform; print(platform.machine())" python -c "import platform; print(platform.release())" echo "***** Check default environment *****" +conda deactivate + conda activate default_prefix_nameless="$CONDA_PREFIX" echo "default_prefix_nameless=$default_prefix_nameless" From 734b1b9d6c8cfac7cf151159c29bef1dd3cf0683 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:33:36 +0100 Subject: [PATCH 14/31] unset CONDA_DEFAULT_ENV --- scripts/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 21d1f544..a5c50ddb 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -112,7 +112,8 @@ python -c "import platform; print(platform.machine())" python -c "import platform; print(platform.release())" echo "***** Check default environment *****" -conda deactivate + +unset CONDA_DEFAULT_ENV conda activate default_prefix_nameless="$CONDA_PREFIX" From 6cf2ba238240709eaea8631406df4c544d0fa730 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 16:39:11 +0100 Subject: [PATCH 15/31] Show config here --- scripts/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test.sh b/scripts/test.sh index a5c50ddb..dc552834 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -114,6 +114,7 @@ python -c "import platform; print(platform.release())" echo "***** Check default environment *****" unset CONDA_DEFAULT_ENV +conda config --show-sources conda activate default_prefix_nameless="$CONDA_PREFIX" From ecd6d715cbb6c56173a135eac8c80706ffe65c65 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 18:35:33 +0100 Subject: [PATCH 16/31] Use new `default_activation_env` --- Miniforge3/construct.yaml | 4 ++-- scripts/test.sh | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 2b963d7b..77094b1b 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -16,11 +16,11 @@ channels: - conda-canary/label/conda-conda-pr-14678 - conda-forge -# Note: this needs https://github.com/conda/conda/pull/14666 for 'default_env' +# Note: this needs https://github.com/conda/conda/pull/14666 for 'default_activation_env' condarc: | channels: - conda-forge - default_env: default + default_activation_env: default # keep pkgs for space-saving implications for hardlinks when create new environments # and keep the same with Miniconda diff --git a/scripts/test.sh b/scripts/test.sh index dc552834..f42a5f64 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -68,8 +68,7 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - eval "$("${CONDA_PATH}/bin/python" -m conda shell.posix hook)" - conda activate base + source "${CONDA_PATH}/bin/activate" echo "***** Print conda info *****" conda info @@ -113,9 +112,6 @@ python -c "import platform; print(platform.release())" echo "***** Check default environment *****" -unset CONDA_DEFAULT_ENV -conda config --show-sources - conda activate default_prefix_nameless="$CONDA_PREFIX" echo "default_prefix_nameless=$default_prefix_nameless" From 0174cfe6a91fe10b50b5ffda9498dd0e7bb99d41 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 18:52:16 +0100 Subject: [PATCH 17/31] explicitly activate base to get mamba in PATH --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index f42a5f64..d2117f2c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -31,7 +31,7 @@ if [[ "$(uname)" == MINGW* ]]; then # Workaround a conda bug where it uses Unix style separators, but MinGW doesn't understand them export PATH=$CONDA_PATH/Library/bin:$PATH # shellcheck disable=SC1091 - source "${CONDA_PATH}/Scripts/activate" + source "${CONDA_PATH}/Scripts/activate" base conda.exe config --set show_channel_urls true echo "***** Print conda info *****" @@ -68,7 +68,7 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - source "${CONDA_PATH}/bin/activate" + source "${CONDA_PATH}/bin/activate" base echo "***** Print conda info *****" conda info From a44b51fba6926474b4c416fc8957ce3f47ae04e1 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:23:16 +0100 Subject: [PATCH 18/31] Unix: initialize mamba too --- scripts/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index d2117f2c..397c9565 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -68,7 +68,8 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - source "${CONDA_PATH}/bin/activate" base + eval "$("$CONDA_PATH/bin/python -m conda shell.posix hook)" + eval "$("$CONDA_PATH/bin/mamba shell hook)" echo "***** Print conda info *****" conda info From c344541bd697a4d92b02b2accf0d4449421c79d5 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:23:31 +0100 Subject: [PATCH 19/31] Windows: add condabin in PATH --- scripts/test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 397c9565..74e571a6 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,9 +29,10 @@ if [[ "$(uname)" == MINGW* ]]; then echo "***** Setup conda *****" # Workaround a conda bug where it uses Unix style separators, but MinGW doesn't understand them - export PATH=$CONDA_PATH/Library/bin:$PATH + # we need condabin in PATH for both conda and mamba + export PATH=$CONDA_PATH/Library/bin:$CONDA_PATH/Library/condabin:$PATH # shellcheck disable=SC1091 - source "${CONDA_PATH}/Scripts/activate" base + source "${CONDA_PATH}/Scripts/activate" conda.exe config --set show_channel_urls true echo "***** Print conda info *****" From 3000cfcb7ca6c0a5ade57032fceac524359ce008 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:23:40 +0100 Subject: [PATCH 20/31] Activate environment for tests --- scripts/test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index 74e571a6..b2da953d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -102,6 +102,10 @@ mamba info --json | python -c "import sys, json; info = json.loads(sys.stdin.rea echo " OK" echo "***** Python path *****" +# These tests use Python, which does need an active environment + +conda activate + python -c "import sys; print(sys.executable)" python -c "import sys; assert 'miniforge' in sys.executable" @@ -112,6 +116,8 @@ python -c "import platform; print(platform.system())" python -c "import platform; print(platform.machine())" python -c "import platform; print(platform.release())" +conda deactivate + echo "***** Check default environment *****" conda activate From bbc490cba9420837eb4208938d21f6f676f92116 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:28:22 +0100 Subject: [PATCH 21/31] oops quotes --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index b2da953d..02876c39 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -69,8 +69,8 @@ EOF echo "***** Setup conda *****" # shellcheck disable=SC1091 - eval "$("$CONDA_PATH/bin/python -m conda shell.posix hook)" - eval "$("$CONDA_PATH/bin/mamba shell hook)" + eval "$("$CONDA_PATH/bin/python" -m conda shell.posix hook)" + eval "$("$CONDA_PATH/bin/mamba" shell hook)" echo "***** Print conda info *****" conda info From 29bc7e0ec3bfea4ab8a86d355310d9984dd95370 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:37:39 +0100 Subject: [PATCH 22/31] report stderr --- scripts/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test.sh b/scripts/test.sh index 02876c39..215f5f84 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -81,6 +81,7 @@ fi echo "+ Mamba does not warn (check that there is no warning on stderr) and returns exit code 0" mamba --help 2> stderr.log || cat stderr.log +cat stderr.log test ! -s stderr.log rm -f stderr.log From 42d08b3e3e301d810aaa8ac94d9faba03e2a0971 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 19:41:12 +0100 Subject: [PATCH 23/31] remove echos while testing mamba so they don't interfere with stderr detection --- scripts/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 215f5f84..d4a67c7b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -79,9 +79,10 @@ EOF conda config --show-sources fi +set +x + echo "+ Mamba does not warn (check that there is no warning on stderr) and returns exit code 0" mamba --help 2> stderr.log || cat stderr.log -cat stderr.log test ! -s stderr.log rm -f stderr.log @@ -102,6 +103,8 @@ echo "+ Testing mamba channels" mamba info --json | python -c "import sys, json; info = json.loads(sys.stdin.read()); assert any('conda-forge' in c for c in info['channels']), info" echo " OK" +set -x + echo "***** Python path *****" # These tests use Python, which does need an active environment From e192421203e375a65f9f058f25c6eb2398603eff Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 20:04:12 +0100 Subject: [PATCH 24/31] try with evals? --- scripts/test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index d4a67c7b..ccfb2175 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -30,9 +30,10 @@ if [[ "$(uname)" == MINGW* ]]; then echo "***** Setup conda *****" # Workaround a conda bug where it uses Unix style separators, but MinGW doesn't understand them # we need condabin in PATH for both conda and mamba - export PATH=$CONDA_PATH/Library/bin:$CONDA_PATH/Library/condabin:$PATH + export PATH=$CONDA_PATH/Library/bin:$PATH # shellcheck disable=SC1091 - source "${CONDA_PATH}/Scripts/activate" + eval "$("$CONDA_PATH/bin/python.exe" -m conda shell.posix hook)" + eval "$("$CONDA_PATH/bin/mamba.exe" shell hook)" conda.exe config --set show_channel_urls true echo "***** Print conda info *****" From 96b786683986ab403e672ff8d4c524d102dba8f8 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 20:14:34 +0100 Subject: [PATCH 25/31] fix paths --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index ccfb2175..a3efdca7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -32,8 +32,8 @@ if [[ "$(uname)" == MINGW* ]]; then # we need condabin in PATH for both conda and mamba export PATH=$CONDA_PATH/Library/bin:$PATH # shellcheck disable=SC1091 - eval "$("$CONDA_PATH/bin/python.exe" -m conda shell.posix hook)" - eval "$("$CONDA_PATH/bin/mamba.exe" shell hook)" + eval "$("$CONDA_PATH/python.exe" -m conda shell.posix hook)" + eval "$("$CONDA_PATH/Library/bin/mamba.exe" shell hook)" conda.exe config --set show_channel_urls true echo "***** Print conda info *****" From 231d831a0e652251a530eec0319e2aa59dd67069 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 17 Mar 2025 20:24:23 +0100 Subject: [PATCH 26/31] do not use .exe extension --- scripts/test.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index a3efdca7..aa6d5bc9 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -34,21 +34,21 @@ if [[ "$(uname)" == MINGW* ]]; then # shellcheck disable=SC1091 eval "$("$CONDA_PATH/python.exe" -m conda shell.posix hook)" eval "$("$CONDA_PATH/Library/bin/mamba.exe" shell hook)" - conda.exe config --set show_channel_urls true + conda config --set show_channel_urls true echo "***** Print conda info *****" - conda.exe info - conda.exe list - conda.exe info --envs - conda.exe config --show-sources + conda info + conda list + conda info --envs + conda config --show-sources echo "***** Check if we are bundling packages from msys2 or defaults *****" - conda.exe list | grep defaults && exit 1 - conda.exe list | grep msys2 && exit 1 + conda list | grep defaults && exit 1 + conda list | grep msys2 && exit 1 echo "***** Check if we can install a package which requires msys2 *****" - conda.exe install r-base --yes --quiet - conda.exe list + conda install r-base --yes --quiet + conda list else # Test one of our installers in batch mode if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then From dc1478c25d10dd6d887216c20b7f9b6cca6f7f87 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 2 Jun 2025 14:28:29 +0200 Subject: [PATCH 27/31] use released conda 25.5.0 --- Miniforge3/construct.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index a6b489a1..1867da6e 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -1,5 +1,5 @@ -{% set version = os.environ.get("MINIFORGE_VERSION", "25.3.0-3") %} -{% set conda_libmamba_solver_version = "25.3.0" %} +{% set version = os.environ.get("MINIFORGE_VERSION", "25.5.0-1") %} +{% set conda_libmamba_solver_version = "25.4.0" %} # This file is parsed by the scripts to define # - `MICROMAMBA_VERSION` in `scripts/build.sh` # - `MAMBA_VERSION` in `scripts/test.sh` @@ -13,7 +13,6 @@ channels: # specifying the channel with the full URL adds two channels # when the end user adds the channel without the full URL # - https://conda.anaconda.org/conda-forge - - conda-canary/label/conda-conda-pr-14678 - conda-forge # Note: this needs https://github.com/conda/conda/pull/14666 for 'default_activation_env' @@ -33,7 +32,7 @@ initialize_conda: True initialize_by_default: False user_requested_specs: - - python 3.12.* + - python 3.13.* - conda >={{ version.split("-")[0] }} - mamba >={{ mamba_version }} - pip @@ -41,7 +40,7 @@ user_requested_specs: - miniforge_console_shortcut 1.* # [win] specs: - - python 3.12.* + - python 3.13.* - conda {{ version.split("-")[0] }}.* - mamba {{ mamba_version }}.* - conda-libmamba-solver {{ conda_libmamba_solver_version }} @@ -51,7 +50,7 @@ specs: extra_envs: default: specs: - - python 3.12.* + - python 3.13.* - pip virtual_specs: From 6231b6df83950e4a9b7291d04bf41fe42703d7b3 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 18 Jul 2025 09:52:18 +0200 Subject: [PATCH 28/31] name env as default-env --- Miniforge3/construct.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 1867da6e..c424d6e9 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -19,7 +19,7 @@ channels: condarc: | channels: - conda-forge - default_activation_env: default + default_activation_env: default-env # keep pkgs for space-saving implications for hardlinks when create new environments # and keep the same with Miniconda @@ -48,7 +48,7 @@ specs: - miniforge_console_shortcut 1.* # [win] extra_envs: - default: + default-env: specs: - python 3.13.* - pip From 65bb65f96082454f8cf60df992734e22faeaf245 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 18 Jul 2025 09:55:23 +0200 Subject: [PATCH 29/31] it's default-env now --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index f4b10c4a..86d7ed5a 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -134,7 +134,7 @@ echo "default_python_nameless=$default_python_nameless" python -V conda deactivate -conda activate default +conda activate default-env default_prefix="$CONDA_PREFIX" echo "default_prefix=$default_prefix" default_python="$(type python)" From 577c3fb5695095deff4001e4ce041a0a6880fa91 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 18 Jul 2025 10:01:46 +0200 Subject: [PATCH 30/31] write_condarc: true --- Miniforge3/construct.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index c424d6e9..71819d6b 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -1,4 +1,4 @@ -{% set version = os.environ.get("MINIFORGE_VERSION", "25.5.0-1") %} +{% set version = os.environ.get("MINIFORGE_VERSION", "25.5.1-1") %} {% set conda_libmamba_solver_version = "25.4.0" %} # This file is parsed by the scripts to define # - `MICROMAMBA_VERSION` in `scripts/build.sh` @@ -15,7 +15,7 @@ channels: # - https://conda.anaconda.org/conda-forge - conda-forge -# Note: this needs https://github.com/conda/conda/pull/14666 for 'default_activation_env' +write_condarc: True condarc: | channels: - conda-forge From e3bfde0c48c0dd25b858d0caa50dde0aad7be33f Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 18 Jul 2025 14:52:49 +0200 Subject: [PATCH 31/31] Use py312 --- Miniforge3/construct.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Miniforge3/construct.yaml b/Miniforge3/construct.yaml index 71819d6b..fbdd2659 100644 --- a/Miniforge3/construct.yaml +++ b/Miniforge3/construct.yaml @@ -32,7 +32,7 @@ initialize_conda: True initialize_by_default: False user_requested_specs: - - python 3.13.* + - python 3.12.* - conda >={{ version.split("-")[0] }} - mamba >={{ mamba_version }} - pip @@ -40,7 +40,7 @@ user_requested_specs: - miniforge_console_shortcut 1.* # [win] specs: - - python 3.13.* + - python 3.12.* - conda {{ version.split("-")[0] }}.* - mamba {{ mamba_version }}.* - conda-libmamba-solver {{ conda_libmamba_solver_version }} @@ -50,7 +50,7 @@ specs: extra_envs: default-env: specs: - - python 3.13.* + - python 3.12.* - pip virtual_specs: