Requirements:
- python2.7
- virtualenv
- git
Install/update google app engine
cd ~
rm -rf .google_appengine
wget http://googleappengine.googlecode.com/files/google_appengine_1.8.9.zip
unzip google_appengine_1.8.9.zip
mv google_appengine .google_appengine
rm google_appengine_1.8.9.zip
Add google appengine to your path (skip it in nitrous.io):
echo "export PATH=$PATH:$HOME/.google_appengine" >> ~/.bashrc
Define the GAEPATH variable (it will be used by the test runner):
echo "export GAEPATH=$HOME/.google_appengine" >> ~/.bashrc
source ~/.bashrc
You can then clone this project and setup your virtual environement:
git clone git@github.com:SingaporeClouds/education.git
cd education
git submodule update --init
git submodule foreach git stash
git submodule foreach git pull origin master
virtualenv pyenv
source pyenv/bin/activate
pip install -r dev-requirements.txt
echo $GAEPATH >> pyenv/lib/python2.7/site-packages/gae.pth
echo `pwd`/lib >> pyenv/lib/python2.7/site-packages/gae.pth
echo "import dev_appserver; dev_appserver.fix_sys_path()" >> pyenv/lib/python2.7/site-packages/gae.pth
or
git clone git@github.com:SingaporeClouds/education.git
cd education
make submodules
make setup-dev
source pyenv/bin/activate
Remember to activate the virtual environement when working on the project:
source pyenv/bin/activate
Depedencies are installed with pip, and should be installed inside the
lib folder (using the -t
option) if they need to be uploaded:
pip install somelibrary -t lib
Please keep the list of depedencies in requirements.txt
up to date.
Note: that libraries only needed for testing should be installed normally (in the pyenv site-package folder) and be listed in dev-requirements.txt)
python runtests.py
or
make test
dev_appserver.py --host=0.0.0.0 --port=8080 ./
or
make server