Skip to content

Commit

Permalink
Merge pull request #251 from jaimergp/condabin
Browse files Browse the repository at this point in the history
Put `mamba` under `condabin/` too
  • Loading branch information
JohanMabille authored Oct 30, 2024
2 parents 50fc5de + b205ae6 commit 63155fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion recipe/build_mamba.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ if /I "%PKG_NAME%" == "mamba" (
cmake --build build-mamba/ --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --install build-mamba/

:: Install BAT hooks in condabin/
CALL "%LIBRARY_BIN%\mamba.exe" shell hook --shell cmd.exe "%PREFIX%"
if errorlevel 1 exit 1
)
3 changes: 3 additions & 0 deletions recipe/build_mamba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ elif [[ $PKG_NAME == "mamba" ]]; then
cmake --build build-mamba/ --parallel ${CPU_COUNT}
cmake --install build-mamba/

# Add symlink to condabin
mkdir -p "${PREFIX}/condabin"
ln -s "${PREFIX}/bin/mamba" "${PREFIX}/condabin/mamba"
fi
6 changes: 5 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source:
sha256: 90e31a0aabc2422685628b23720fdfd4dd5b50827258afeab5500effe250f799

build:
number: 1
number: 2

outputs:
- name: libmamba
Expand Down Expand Up @@ -160,9 +160,13 @@ outputs:
test:
commands:
- test -f "${PREFIX}/bin/mamba" # [unix]
- test -f "${PREFIX}/condabin/mamba" # [unix]
- test -f "${PREFIX}/etc/profile.d/mamba.sh" # [unix]
- if not exist %LIBRARY_BIN%\mamba.exe (exit 1) # [win]
- if not exist %PREFIX%\condabin\mamba.bat (exit 1) # [win]
- mamba --help
- ${PREFIX}/condabin/mamba --help # [unix]
- CALL %PREFIX%/condabin/mamba.bat --help # [win]
- export MAMBA_ROOT_PREFIX="$(mktemp -d)" # [unix]
- mkdir %TEMP%\mamba # [win]
- set "MAMBA_ROOT_PREFIX=%TEMP%\mamba" # [win]
Expand Down

0 comments on commit 63155fc

Please sign in to comment.