6 APT_GET
=$
(which apt-get
)
7 APT_FLAGS
='-q --no-install-suggests --no-install-recommends'
9 PIP_FLAGS
='--no-binary :all'
11 DEPENDS
="build-essential openssl sqlite3 python-dev python-setuptools"
12 DEPENDS
="${DEPENDS} libgeoip-dev geoip-database libjpeg-dev"
15 if [ "$EUID" != "0" ] ; then SUDO
=$
(which sudo
); fi
16 # pip is pre-installed on Travis-CI machines in their Python environment, so
17 # we should avoid reinstalling it (as that might do odd things to the
18 # virtualenv that we're already inside):
19 if [ "$TRAVIS" == "true" ] ; then
20 DEPENDS
="${DEPENDS} realpath"
22 DEPENDS
="${DEPENDS} python-pip flog"
26 for dep
in $DEPENDS ; do
27 if ! test "$(dpkg -l $dep | grep \"ii $dep\")" ; then
28 MISSING
="${MISSING} $dep"
32 $SUDO $APT_GET install ${APT_FLAGS} ${MISSING}
34 # When running on Travis, we are installing a few extra packages, e.g., to
35 # determine code coverage.
36 if [ "$TRAVIS" == "true" ] ; then
37 $PIP install $PIP_FLAGS -r "$HERE/../.travis.requirements.txt"
39 $PIP install $PIP_FLAGS -r "$HERE/../requirements.txt"