From 0acc107bc2bc678342f275e2d046929e4094a172 Mon Sep 17 00:00:00 2001 From: Anusha Ramineni Date: Mon, 8 May 2017 12:43:45 +0530 Subject: [PATCH] pep8 to install only required packages This commits updates pep8 to install only required packages ref: I0596a6970725189fd9b46a0cac923b86ccb03f8c Change-Id: Ie6cda130233f93c940b1c6ae085cda7b80df061e --- tools/pip-install-single-req.sh | 5 +++++ tox.ini | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 tools/pip-install-single-req.sh diff --git a/tools/pip-install-single-req.sh b/tools/pip-install-single-req.sh new file mode 100755 index 0000000..b2ef4ff --- /dev/null +++ b/tools/pip-install-single-req.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# install specific package $2 according to +# version specified in requirements file $1 +pip install -U `grep $2 $1 | sed 's/#.*//'` diff --git a/tox.ini b/tox.ini index d78a755..4a87ee1 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,10 @@ deps = -r{toxinidir}/requirements.txt commands = python manage.py test {posargs} --settings=congress_dashboard.test.settings [testenv:pep8] -commands = flake8 {posargs} +usedevelop = False +deps = +commands = {toxinidir}/tools/pip-install-single-req.sh test-requirements.txt hacking + flake8 [testenv:venv] commands = {posargs} @@ -33,6 +36,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen [flake8] exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,node_modules +show-source = True [hacking] import_exceptions = collections.defaultdict,