Accelerate local builds by caching psutil, prctl

This commit is contained in:
Thomas Orozco 2015-09-01 21:14:44 +02:00
parent 376d186b2e
commit 1dc66f81eb
2 changed files with 5 additions and 3 deletions

View File

@ -4,4 +4,5 @@ RUN apt-get update \
&& apt-get install --no-install-recommends --yes build-essential git gdb valgrind cmake rpm python-dev libcap-dev python-pip python-virtualenv \
&& rm -rf /var/lib/apt/lists/*
RUN pip install psutil
# Pre-install those here for faster local builds.
RUN CFLAGS="-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37" pip install psutil python-prctl

View File

@ -62,9 +62,10 @@ for tini in "${BUILD_DIR}/tini" "${BUILD_DIR}/tini-static"; do
fi
done
# Create virtual environment to run tests
# Create virtual environment to run tests.
# Accept system site packages for faster local builds.
VENV="${BUILD_DIR}/venv"
virtualenv "${VENV}"
virtualenv --system-site-packages "${VENV}"
# Don't use activate because it does not play nice with nounset
export PATH="${VENV}/bin:${PATH}"