2016-05-27 22:40:30 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# This script is used by travis to install lbry from source
|
|
|
|
#
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
set -o xtrace
|
|
|
|
|
|
|
|
SUDO=''
|
|
|
|
if (( $EUID != 0 )); then
|
|
|
|
SUDO='sudo'
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${TRAVIS+x} ]; then
|
|
|
|
# if not on travis, its nice to see progress
|
|
|
|
QUIET=""
|
|
|
|
else
|
|
|
|
QUIET="-qq"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# get the required OS packages
|
|
|
|
$SUDO apt-get ${QUIET} update
|
|
|
|
$SUDO apt-get ${QUIET} install -y --no-install-recommends \
|
|
|
|
build-essential python-dev libffi-dev libssl-dev git \
|
|
|
|
libgmp3-dev wget ca-certificates python-virtualenv
|
|
|
|
|
|
|
|
# create a virtualenv so we don't muck with anything on the system
|
|
|
|
virtualenv venv
|
|
|
|
# need to unset these or else we can't activate
|
|
|
|
set +eu
|
|
|
|
source venv/bin/activate
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# need a modern version of pip (more modern than ubuntu default)
|
|
|
|
wget https://bootstrap.pypa.io/get-pip.py
|
|
|
|
python get-pip.py
|
|
|
|
rm get-pip.py
|
|
|
|
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2016-10-30 21:44:45 +01:00
|
|
|
pip install mock pylint coveralls
|
|
|
|
# have to do `which trial` instead of simply trial because coverage needs the full path
|
|
|
|
coverage run --source=lbrynet `which trial` tests
|
|
|
|
coveralls
|
2016-05-27 22:40:30 +02:00
|
|
|
|
2016-07-25 21:53:07 +02:00
|
|
|
# Ignoring distutils because: https://github.com/PyCQA/pylint/issues/73
|
2016-05-27 22:40:30 +02:00
|
|
|
# TODO: as code quality improves, make pylint be more strict
|
2016-08-08 22:42:35 +02:00
|
|
|
pylint -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils \
|
2016-11-04 21:09:40 +01:00
|
|
|
--enable=unused-import --enable=bad-whitespace lbrynet
|