forked from kbase/narrative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.narrative
executable file
·43 lines (37 loc) · 1.28 KB
/
Makefile.narrative
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
43
# build/install narrative
ipython_branch=1.x
log=install.log
install: init-install ipython-install biokbase-install script-install finish-install
init-install:
@printf "* Install *\n"
@cat /dev/null > ${log}
ipython-install:
@if [ ! -e ipython ]; then \
printf "Cloning IPython branch ${ipython_branch}\n"; \
git clone https://github.com/ipython/ipython.git -b ${ipython_branch}; \
printf "Installing IPython branch $ipython_branch, log in ${log}\n"; \
cd ipython/; \
python setup.py install >> ${log} 2>&1; \
printf "Done installing IPython.\n"; \
fi
biokbase-install:
@printf "Installing biokbase, log in ${log}\n"
@printf " Installing requirements from src/requirements.txt with 'pip'\n"
@while read s; do pip install -U $$s; done < src/requirements.txt >> ../${log} 2>&1
@printf " Running local 'setup.py'\n"
@cd src ; python setup.py install >> ../${log} 2>&1
@printf "Done installing biokbase.\n"
script-install:
@printf "Installing scripts\n"
@i=0; while read s; do \
echo $$s; \
if [ $$i = 0 ]; then \
echo d=`pwd`; \
echo e=$$(dirname `which python`); \
i=1;\
fi; \
done < run_notebook.tmpl > run_notebook
@d=$$(dirname `which python`); chmod 0755 run_notebook; mv run_notebook $$d
@printf "Done installing scripts\n"
finish-install:
@printf "* Done *\n"