forked from tuum-tech/assist-restapi-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (34 loc) · 994 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·40 lines (34 loc) · 994 Bytes
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
#!/usr/bin/env bash
echo "Install required packages"
case `uname` in
Linux )
sudo apt-get update -y
sudo apt-get install build-essential python3.7 python3-dev libleveldb-dev libpython3.7-dev -y
;;
Darwin )
brew update
brew install leveldb python@3.7
;;
*)
exit 1
;;
esac
pip3 install virtualenv
type virtualenv >/dev/null 2>&1 || { echo >&2 "No suitable python virtual env tool found, aborting"; exit 1; }
rm -rf .venv
virtualenv -p `which python3.7` .venv
source .venv/bin/activate
pip install --upgrade pip
case `uname` in
Linux )
pip install -r requirements.txt
;;
Darwin )
pip install --global-option=build_ext \
--global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" \
--global-option="-I/usr/local/opt/zlib/include" --global-option="-L/usr/local/opt/zlib/lib" -r requirements.txt
;;
*)
exit 1
;;
esac