Adding utility files to ease the bare metal deployment. · pythonDrive/bootcamp@2f8693a · GitHub
Skip to content

Commit 2f8693a

Browse files
Adding utility files to ease the bare metal deployment.
1 parent c21697a commit 2f8693a

6 files changed

Lines changed: 227 additions & 0 deletions

utility/install_os_dependencies.sh

Lines changed: 96 additions & 0 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
WORK_DIR="$(dirname "$0")"
4+
PROJECT_DIR="$(dirname "$WORK_DIR")"
5+
6+
pip --version >/dev/null 2>&1 || {
7+
echo >&2 -e "\npip is required but it's not installed."
8+
echo >&2 -e "You can install it by running the following command:\n"
9+
echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python3 get-pip.py"
10+
echo >&2 -e "\n"
11+
echo >&2 -e "\nFor more information, see pip documentation: https://pip.pypa.io/en/latest/"
12+
exit 1;
13+
}
14+
15+
virtualenv --version >/dev/null 2>&1 || {
16+
echo >&2 -e "\nvirtualenv is required but it's not installed."
17+
echo >&2 -e "You can install it by running the following command:\n"
18+
echo >&2 "sudo -H pip3 install virtualenv"
19+
echo >&2 -e "\n"
20+
echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/"
21+
exit 1;
22+
}
23+
24+
if [ -z "$VIRTUAL_ENV" ]; then
25+
echo >&2 -e "\nYou need activate a virtualenv first"
26+
echo >&2 -e 'If you do not have a virtualenv created, run the following command to create and automatically activate a new virtualenv named "venv" on current folder:\n'
27+
echo >&2 -e "virtualenv venv --python=\`which python3\`"
28+
echo >&2 -e "\nTo leave/disable the currently active virtualenv, run the following command:\n"
29+
echo >&2 "deactivate"
30+
echo >&2 -e "\nTo activate the virtualenv again, run the following command:\n"
31+
echo >&2 "source venv/bin/activate"
32+
echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/"
33+
echo >&2 -e "\n"
34+
exit 1;
35+
else
36+
37+
pip install -r $PROJECT_DIR/requirements/local.txt
38+
pip install -r $PROJECT_DIR/requirements.txt
39+
fi

utility/requirements-jessie.apt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
##basic build dependencies of various Django apps for Debian Jessie 8.x
2+
#build-essential metapackage install: make, gcc, g++,
3+
build-essential
4+
#required to translate
5+
gettext
6+
python3-dev
7+
8+
##shared dependencies of:
9+
##Pillow, pylibmc
10+
zlib1g-dev
11+
12+
##Postgresql and psycopg2 dependencies
13+
libpq-dev
14+
15+
##Pillow dependencies
16+
libtiff5-dev
17+
libjpeg62-turbo-dev
18+
libfreetype6-dev
19+
liblcms2-dev
20+
libwebp-dev
21+
22+
##django-extensions
23+
graphviz-dev

utility/requirements-stretch.apt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
##basic build dependencies of various Django apps for Debian Jessie 9.x
2+
#build-essential metapackage install: make, gcc, g++,
3+
build-essential
4+
#required to translate
5+
gettext
6+
python3-dev
7+
8+
##shared dependencies of:
9+
##Pillow, pylibmc
10+
zlib1g-dev
11+
12+
##Postgresql and psycopg2 dependencies
13+
libpq-dev
14+
15+
##Pillow dependencies
16+
libtiff5-dev
17+
libjpeg62-turbo-dev
18+
libfreetype6-dev
19+
liblcms2-dev
20+
libwebp-dev
21+
22+
##django-extensions
23+
graphviz-dev

utility/requirements-trusty.apt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
##basic build dependencies of various Django apps for Ubuntu Trusty 14.04
2+
#build-essential metapackage install: make, gcc, g++,
3+
build-essential
4+
#required to translate
5+
gettext
6+
python3-dev
7+
8+
##shared dependencies of:
9+
##Pillow, pylibmc
10+
zlib1g-dev
11+
12+
##Postgresql and psycopg2 dependencies
13+
libpq-dev
14+
15+
##Pillow dependencies
16+
libtiff4-dev
17+
libjpeg8-dev
18+
libfreetype6-dev
19+
liblcms1-dev
20+
libwebp-dev
21+
22+
##django-extensions
23+
graphviz-dev

utility/requirements-xenial.apt

Lines changed: 23 additions & 0 deletions

0 commit comments

Comments
 (0)