7
7
test-dev-env test-dl-ins uninstall-env uninstall-mamba
8
8
.SILENT : build dev help install-env install-mamba lint pre-build pub test-pub\
9
9
test-dev-env test-dl-ins uninstall-env uninstall-mamba
10
- MAMBADL := https://github.com/conda-forge/miniforge/releases/download/23.3.1-1
10
+ MAMBADL := https://github.com/conda-forge/miniforge/releases/download/24.11.3-0
11
11
MAMBAV := Miniforge3-MacOSX-arm64.sh
12
12
MAMBARCMSG := Please create file $(MAMBARC ) , importantly set ` platform: osx-arm64 `
13
13
MAMBARC := $(HOME ) /.mambarc
@@ -28,9 +28,8 @@ build: ## build package oreum_core (actually more of an "assemble" than a compi
28
28
dev : # # create env for local dev
29
29
make install-env
30
30
export PATH=$(MAMBADIR ) /envs/oreum_core/bin:$$ PATH; \
31
- export CONDA_ENV_PATH=$(MAMBADIR ) /envs/oreum_core/bin; \
32
- export CONDA_DEFAULT_ENV=oreum_core; \
33
- export CONDA_SUBDIR=osx-arm64; \
31
+ export MAMBA_EXE=' $(MAMBADIR)/bin/mamba' ; \
32
+ export MAMBA_ROOT_PREFIX=' $(MAMBADIR)' ; \
34
33
$(PYTHON_ENV ) -m pip install -e " .[all]" ; \
35
34
$(PYTHON_ENV ) -c " import numpy as np; np.__config__.show()" > dev/install_log/blas_info.txt; \
36
35
pipdeptree -a > dev/install_log/pipdeptree.txt; \
@@ -43,7 +42,8 @@ install-env: ## create mamba (conda) environment
43
42
export PATH=$(MAMBADIR ) /bin:$$ PATH; \
44
43
if which mamba; then echo " mamba ready" ; else make install-mamba; fi
45
44
export PATH=$(MAMBADIR ) /bin:$$ PATH; \
46
- export CONDA_SUBDIR=osx-arm64; \
45
+ export MAMBA_EXE=' $(MAMBADIR)/bin/mamba' ; \
46
+ export MAMBA_ROOT_PREFIX=' $(MAMBADIR)' ; \
47
47
mamba update -n base mamba; \
48
48
mamba env create --file condaenv_oreum_core.yml -y;
49
49
@@ -53,7 +53,7 @@ install-mamba: ## get mamba via miniforge, explicitly use bash
53
53
chmod 755 $(HOME ) /miniforge.sh
54
54
bash $(HOME ) /miniforge.sh -b -p $(MAMBADIR )
55
55
export PATH=$(MAMBADIR ) /bin:$$ PATH; \
56
- conda init zsh ;
56
+ mamba shell init ;
57
57
rm $(HOME ) /miniforge.sh
58
58
59
59
lint : # # run code linters and static security (checks only)
74
74
@echo " test-dl-ins test dl & install from testpypi"
75
75
@echo " uninstall-env remove env (use from parent dir \make -C oreum_core ...)"
76
76
77
-
78
77
pre-build : # # setup env for flit build or flit publish
79
78
rm -rf dist
80
79
$(PYTHON ) -m pip install flit keyring
@@ -90,16 +89,13 @@ test-pub: ## all-in-one build and publish to testpypi
90
89
export FLIT_INDEX_URL=https://test.pypi.org/legacy/; \
91
90
$(PYTHON ) -m flit publish
92
91
93
- test-dev-env : # # test the dev machine install of critial numeric packages
92
+ test-dev-env : # # test the dev machine install of critical numeric packages
94
93
export PATH=$(MAMBADIR ) /bin:$$ PATH; \
95
- export PATH=$(MAMBADIR ) /envs/oreum_core/bin:$$ PATH; \
96
- export CONDA_ENV_PATH=$(MAMBADIR ) /envs/oreum_core/bin; \
97
- export CONDA_DEFAULT_ENV=oreum_core; \
94
+ export MAMBA_EXE=' $(MAMBADIR)/bin/mamba' ; \
95
+ export MAMBA_ROOT_PREFIX=' $(MAMBADIR)' ; \
98
96
$(PYTHON_ENV ) -c " import numpy as np; np.test()" > dev/install_log/tests_numpy.txt; \
99
97
$(PYTHON_ENV ) -c " import scipy as sp; sp.test()" > dev/install_log/tests_scipy.txt;
100
98
101
- # $(PYTHON_ENV) -c "import pymc as pm; pm.test()" > dev/install_log/pymc.txt; \
102
-
103
99
test-dl-ins : # # test dl & install from testpypi, set env var or pass in VERSION
104
100
$(PYTHON ) -m pip uninstall -y oreum_core
105
101
$(PYTHON ) -m pip index versions --pre -i https://test.pypi.org/simple/ oreum_core
@@ -108,13 +104,13 @@ test-dl-ins: ## test dl & install from testpypi, set env var or pass in VERSION
108
104
109
105
uninstall-env : # # remove mamba env
110
106
export PATH=$(MAMBADIR ) /bin:$$ PATH; \
111
- export CONDA_SUBDIR=osx-arm64 ; \
107
+ export MAMBA_ROOT_PREFIX= ' $(MAMBADIR) ' ; \
112
108
mamba env remove --name oreum_core -y; \
113
- conda clean --all -afy;
114
- # mamba clean -afy # 2023-12-10 see: https://github.com/mamba-org/mamba/issues/3044
109
+ mamba clean -ay
115
110
116
- uninstall-mamba : # # last ditch per https://github.com/conda-forge/miniforge#uninstallation
117
- conda init zsh --reverse
111
+ uninstall-mamba : # # nuclear option https://github.com/conda-forge/miniforge?tab=readme-ov-file#uninstall
112
+ mamba shell deinit
118
113
rm -rf $(MAMBADIR )
119
- rm -rf $(HOME ) /.conda
120
- rm -f $(HOME ) /.condarc
114
+ rm -rf $(HOME ) /.mamba
115
+ rm -f $(HOME ) /.mambarc
116
+ rm -f $(HOME ) /.mambarc_x86
0 commit comments