Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
include make_alma_fetch
SHELL := /bin/bash
py := python3
os := $(shell uname -s)
home_dir := $(shell pwd)
setup_dirs := $(shell find . -name setup.py | tr '\n' ' ' | sed "s/setup.py//g")
.PHONY: ${HOME}/miniconda3 clean
all: miniconda-installed build-python build-alma
miniconda-installed ${HOME}/miniconda3:
conda env update
${HOME}/miniconda3:
@url="https://repo.anaconda.com/miniconda/"
if [ "$(os)" == "Darwin" ]; \
then \
file="Miniconda3-latest-MacOSX-x86_64.sh"; \
elif [ "$(os)" == "Linux" ]; \
then \
file="Miniconda3-latest-Linux-x86_64.sh"; \
fi
echo $(addsuffix $(file),$(url))
wget $(addsuffix $(file),$(url)) -P ${HOME}
chmod +x $$HOME/$$file
$$HOME/$$file
build-python $(setup_dirs):
@for dir in $(setup_dirs) ; do \
cd $$dir ; \
$(py) setup.py develop ; \
cd $(home_dir) ; \
done
clean:
find . -name '*.pyc' -exec rm --force {} +
find . -name '*.pyo' -exec rm --force {} +
find . -name '*~' -exec rm --force {} +
rm -f -R *.egg-info
conda deactivate