Skip to content
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
328f425
Define 'default' extra env configured to auto-activate
jaimergp Mar 12, 2025
ec451b0
Test default env
jaimergp Mar 13, 2025
ea2be22
Force Intel mac
jaimergp Mar 13, 2025
52901f2
Use type instead of which
jaimergp Mar 13, 2025
e3c1529
test as nameless
jaimergp Mar 17, 2025
f6bcf45
Use conda from #14678
jaimergp Mar 17, 2025
896753e
do not be so strict about versions
jaimergp Mar 17, 2025
3c3ad4f
activate conda base explicitly to have mamba in PATH
jaimergp Mar 17, 2025
b6e7eae
Activate base explicitly
jaimergp Mar 17, 2025
88ed77b
Use hook first
jaimergp Mar 17, 2025
ded128e
config --show-sources
jaimergp Mar 17, 2025
81a0a03
unset CONDA_DEFAULT_ENV
jaimergp Mar 17, 2025
b65476c
deactivate first?
jaimergp Mar 17, 2025
734b1b9
unset CONDA_DEFAULT_ENV
jaimergp Mar 17, 2025
6cf2ba2
Show config here
jaimergp Mar 17, 2025
ecd6d71
Use new `default_activation_env`
jaimergp Mar 17, 2025
0174cfe
explicitly activate base to get mamba in PATH
jaimergp Mar 17, 2025
a44b51f
Unix: initialize mamba too
jaimergp Mar 17, 2025
c344541
Windows: add condabin in PATH
jaimergp Mar 17, 2025
3000cfc
Activate environment for tests
jaimergp Mar 17, 2025
bbc490c
oops quotes
jaimergp Mar 17, 2025
29bc7e0
report stderr
jaimergp Mar 17, 2025
42d08b3
remove echos while testing mamba so they don't interfere with stderr …
jaimergp Mar 17, 2025
e192421
try with evals?
jaimergp Mar 17, 2025
96b7866
fix paths
jaimergp Mar 17, 2025
231d831
do not use .exe extension
jaimergp Mar 17, 2025
58d54eb
Merge branch 'default-env-experiments' of github.com:jaimergp/minifor…
jaimergp Jun 2, 2025
dc1478c
use released conda 25.5.0
jaimergp Jun 2, 2025
12c72dd
Merge branch 'main' of github.com:conda-forge/miniforge into default-…
jaimergp Jul 18, 2025
6231b6d
name env as default-env
jaimergp Jul 18, 2025
65bb65f
it's default-env now
jaimergp Jul 18, 2025
577c3fb
write_condarc: true
jaimergp Jul 18, 2025
e3bfde0
Use py312
jaimergp Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
23 changes: 17 additions & 6 deletions Miniforge3/construct.yaml
Original file line number Diff line number Diff line change
@@ -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.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`
# - `MAMBA_VERSION` in `scripts/test.sh`
Expand All @@ -16,6 +16,11 @@ channels:
- conda-forge

write_condarc: True
condarc: |
channels:
- conda-forge
default_activation_env: default-env

# keep pkgs for space-saving implications for hardlinks when create new environments
# and keep the same with Miniconda
keep_pkgs: True
Expand All @@ -27,21 +32,27 @@ initialize_conda: True
initialize_by_default: False

user_requested_specs:
- python 3.12.*
- python 3.13.*
- conda >={{ version.split("-")[0] }}
- mamba >={{ mamba_version }}
- pip
# Omit conda-libmamba-solver so that conda is free to remove it later
- miniforge_console_shortcut 1.* # [win]

specs:
- python 3.12.*
- conda {{ version.split("-")[0] }}
- mamba {{ mamba_version }}
- python 3.13.*
Comment thread
jaimergp marked this conversation as resolved.
Outdated
- conda {{ version.split("-")[0] }}.*
- mamba {{ mamba_version }}.*
- conda-libmamba-solver {{ conda_libmamba_solver_version }}
- pip
- miniforge_console_shortcut 1.* # [win]

extra_envs:
default-env:
specs:
- python 3.13.*
Comment thread
jaimergp marked this conversation as resolved.
Outdated
- pip

virtual_specs:
- __glibc >=2.17 # [linux]
- __osx >=10.13 # [osx]
56 changes: 47 additions & 9 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,26 @@ 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:$PATH
# shellcheck disable=SC1091
source "${CONDA_PATH}/Scripts/activate"
conda.exe config --set show_channel_urls true
eval "$("$CONDA_PATH/python.exe" -m conda shell.posix hook)"
eval "$("$CONDA_PATH/Library/bin/mamba.exe" shell hook)"
conda config --set show_channel_urls true

echo "***** Print conda info *****"
conda.exe info
conda.exe list
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}" == "Miniforge3" ]]; then
Expand All @@ -66,13 +70,18 @@ EOF

echo "***** Setup conda *****"
# shellcheck disable=SC1091
source "${CONDA_PATH}/bin/activate"
eval "$("$CONDA_PATH/bin/python" -m conda shell.posix hook)"
eval "$("$CONDA_PATH/bin/mamba" shell hook)"

echo "***** Print conda info *****"
conda info
conda list
conda info --envs
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
test ! -s stderr.log
Expand All @@ -96,7 +105,13 @@ echo "+ Testing mamba channels"
mamba info --json | python -c "import sys, json; info = json.loads(sys.stdin.read()); assert any('${MINIFORGE_CHANNEL_NAME}' 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

conda activate

python -c "import sys; print(sys.executable)"
python -c "import sys; assert 'miniforge' in sys.executable"

Expand All @@ -107,6 +122,29 @@ 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
default_prefix_nameless="$CONDA_PREFIX"
echo "default_prefix_nameless=$default_prefix_nameless"
default_python_nameless="$(type python)"
echo "default_python_nameless=$default_python_nameless"
python -V
conda deactivate

conda activate default-env
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 *****"
Expand Down
Loading