Added build-essential to deps, to install packages without precompiled whl

like netifaces
This commit is contained in:
Shay Nehmad 2020-04-10 14:45:25 +03:00
parent c72ed36b76
commit 5c6b9c43b3
2 changed files with 14 additions and 1 deletions

View File

@ -5,4 +5,12 @@ Homepage: https://www.infectionmonkey.com
Priority: optional
Version: 1.0
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

View File

@ -8,11 +8,16 @@ PYTHON_VERSION=python3.7
# Prepare python virtualenv
# 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
echo "Using $(command -v $PYTHON_VERSION) as the base for virtualenv creation."
$PYTHON_VERSION -m venv ${PYTHON_FOLDER}
# shellcheck disable=SC1090
source ${PYTHON_FOLDER}/bin/activate
# install pip requirements
${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
rm -rf ${INSTALLATION_FOLDER}
rm -f ${MONKEY_FOLDER}/monkey_island/requirements.txt