python-zulip-api: Add tools/provision for setting up dev env.

This commit is contained in:
Eeshan Garg 2017-08-07 20:37:58 -02:30 committed by Tim Abbott
parent e4c34d77e7
commit f9655266df
3 changed files with 23 additions and 0 deletions

3
.gitignore vendored
View file

@ -31,3 +31,6 @@ nosetests.xml
.mr.developer.cfg .mr.developer.cfg
.project .project
.pydevproject .pydevproject
# ignore virtualenv created by ./tools/provision
.zulip-api-env

4
requirements.txt Normal file
View file

@ -0,0 +1,4 @@
pycodestyle==2.3.1
-e ./zulip
-e ./zulip_bots
-e ./zulip_botserver

16
tools/provision Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
BASEDIR=`dirname $0`/..
if [ ! -d "$BASEDIR/.zulip-api-env" ]; then
virtualenv $BASEDIR/.zulip-api-env
echo "Virtualenv created."
fi
source $BASEDIR/.zulip-api-env/bin/activate
if [ ! -f "$BASEDIR/.zulip-api-env/updated" -o $BASEDIR/requirements.txt -nt $BASEDIR/.zulip-api-env/updated ]; then
pip install -r $BASEDIR/requirements.txt
touch $BASEDIR/.zulip-api-env/updated
echo "Requirements installed."
fi