forked from p15670423/monkey
Added build-essential to deps, to install packages without precompiled whl
like netifaces
This commit is contained in:
parent
c72ed36b76
commit
5c6b9c43b3
|
@ -5,4 +5,12 @@ Homepage: https://www.infectionmonkey.com
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Version: 1.0
|
Version: 1.0
|
||||||
Description: Guardicore Infection Monkey Island installation package
|
Description: Guardicore Infection Monkey Island installation package
|
||||||
Depends: openssl, python3.7-dev, python3.7-venv
|
|
||||||
|
# | Dependency | Why is it required |
|
||||||
|
# |----------------- |--------------------------------------------------------------------------------------------------- |
|
||||||
|
# | openssl | Server certificate generation |
|
||||||
|
# | python3.7-dev | Server runtime |
|
||||||
|
# | python3.7-venv | For creating virtual env to install all the server pip deps (don't want to pollute system python) |
|
||||||
|
# | python3-venv | python3.7-venv doesn't work without it since you need ensure-pip. |
|
||||||
|
# | build-essential | for compiling python dependencies that don't come in a pre-compiled wheel, like `netifaces` |
|
||||||
|
Depends: openssl, python3.7-dev, python3.7-venv, python3-venv, build-essential
|
||||||
|
|
|
@ -8,11 +8,16 @@ PYTHON_VERSION=python3.7
|
||||||
# Prepare python virtualenv
|
# Prepare python virtualenv
|
||||||
# This is using the apt package `python3.7-venv` which is listed in the `control` file as a dependency.
|
# This is using the apt package `python3.7-venv` which is listed in the `control` file as a dependency.
|
||||||
# See https://packages.debian.org/stable/python/python3.7-venv
|
# See https://packages.debian.org/stable/python/python3.7-venv
|
||||||
|
echo "Using $(command -v $PYTHON_VERSION) as the base for virtualenv creation."
|
||||||
$PYTHON_VERSION -m venv ${PYTHON_FOLDER}
|
$PYTHON_VERSION -m venv ${PYTHON_FOLDER}
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source ${PYTHON_FOLDER}/bin/activate
|
||||||
|
|
||||||
# install pip requirements
|
# install pip requirements
|
||||||
${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/monkey_island/requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/monkey_island/requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||||
|
|
||||||
|
deactivate
|
||||||
|
|
||||||
# remove installation folder and unnecessary files
|
# remove installation folder and unnecessary files
|
||||||
rm -rf ${INSTALLATION_FOLDER}
|
rm -rf ${INSTALLATION_FOLDER}
|
||||||
rm -f ${MONKEY_FOLDER}/monkey_island/requirements.txt
|
rm -f ${MONKEY_FOLDER}/monkey_island/requirements.txt
|
||||||
|
|
Loading…
Reference in New Issue