Make deb use virtualenv
This commit is contained in:
parent
a5135c3c3f
commit
a2da9614a6
|
@ -2,16 +2,18 @@
|
||||||
|
|
||||||
MONKEY_FOLDER=/var/monkey_island
|
MONKEY_FOLDER=/var/monkey_island
|
||||||
INSTALLATION_FOLDER=/var/monkey_island/installation
|
INSTALLATION_FOLDER=/var/monkey_island/installation
|
||||||
|
PYTHON_FOLDER=/var/monkey_island/bin/python
|
||||||
|
|
||||||
cp -f ${MONKEY_FOLDER}/monkey.sh /usr/bin/monkey
|
cp -f ${MONKEY_FOLDER}/monkey.sh /usr/bin/monkey
|
||||||
chmod 755 /usr/bin/monkey
|
chmod 755 /usr/bin/monkey
|
||||||
|
|
||||||
# Fix dependency bug
|
# Prepare python virtualenv
|
||||||
pip uninstall -y bson
|
pip install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||||
|
mkdir ${MONKEY_FOLDER}/bin
|
||||||
|
virtualenv ${PYTHON_FOLDER}
|
||||||
|
|
||||||
# install pip requirements
|
# install pip requirements
|
||||||
pip install -r $MONKEY_FOLDER/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
${PYTHON_FOLDER}/bin/python/python -m pip install -r $MONKEY_FOLDER/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||||
|
|
||||||
|
|
||||||
# remove installation folder and unnecessary files
|
# remove installation folder and unnecessary files
|
||||||
rm -rf ${INSTALLATION_FOLDER}
|
rm -rf ${INSTALLATION_FOLDER}
|
||||||
|
|
|
@ -10,3 +10,4 @@ Flask-Pymongo
|
||||||
Flask-Restful
|
Flask-Restful
|
||||||
jsonschema
|
jsonschema
|
||||||
netifaces
|
netifaces
|
||||||
|
virtualenv
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd /var/monkey_island/cc
|
cd /var/monkey_island/cc
|
||||||
python main.py
|
/var/monkey_island/bin/python/python main.py
|
Loading…
Reference in New Issue