forked from FDA/openfda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·44 lines (35 loc) · 931 Bytes
/
bootstrap.sh
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
44
#!/bin/bash
#
# Python
#
rm -rf build/
export LANG=C
# We emulate readlink with python, so we can work on OSX without greadlink.
# From: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-
# of-gnus-readlink-f-on-a-mac
PYTHON_ENV=$(python -c 'import os,sys;print os.path.realpath(sys.argv[1])' ./_python-env)
PYTHON=$(which python)
if [[ -n MACHTYPE ]]; then
PIP="pip install"
else
PIP="pip install --user"
fi
$PIP virtualenv
$PIP awscli
# Setup virtualenv if it doesn't exist.
test -e $PYTHON_ENV || virtualenv -p $PYTHON $PYTHON_ENV
# Install project sources and dependencies into the environment
$PYTHON_ENV/bin/pip uninstall -y openfda || true
$PYTHON_ENV/bin/pip install -U -r requirements.txt
$PYTHON_ENV/bin/python setup.py develop
#
# Node
#
pushd api/faers
echo 'installing node modules for API'
npm install
popd
pushd openfda/spl
echo 'installing node modules for build'
npm install
popd