python-zulip-api: Add tools/provision for setting up dev env.
This commit is contained in:
parent
e4c34d77e7
commit
f9655266df
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -31,3 +31,6 @@ nosetests.xml
|
|||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# ignore virtualenv created by ./tools/provision
|
||||
.zulip-api-env
|
||||
|
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
pycodestyle==2.3.1
|
||||
-e ./zulip
|
||||
-e ./zulip_bots
|
||||
-e ./zulip_botserver
|
16
tools/provision
Executable file
16
tools/provision
Executable 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
|
Loading…
Reference in a new issue