1{ stdenv, buildPythonPackage, fetchPypi
2, inflect
3, jinja2
4, jinja2_pluralize
5, pygments
6, six
7# test dependencies
8, coverage
9, flake8
10, mock
11, nose
12, pycodestyle
13, pyflakes
14, pylint
15, pytest
16}:
17
18buildPythonPackage rec {
19 pname = "diff_cover";
20 version = "3.0.1";
21
22 preCheck = ''
23 export LC_ALL=en_US.UTF-8;
24 '';
25
26 src = fetchPypi {
27 inherit pname version;
28 sha256 = "13768c8bc755dd8e1184ce79b95bbc8115ea566282f4b06efbeca72a4d00427b";
29 };
30
31 propagatedBuildInputs = [ jinja2 jinja2_pluralize pygments six inflect ];
32
33 checkInputs = [ mock coverage pytest nose pylint pyflakes pycodestyle ];
34
35 # ignore tests which try to write files
36 checkPhase = ''
37 pytest -k 'not added_file_pylint_console and not file_does_not_exist'
38 '';
39
40 meta = with stdenv.lib; {
41 description = "Automatically find diff lines that need test coverage";
42 homepage = "https://github.com/Bachmann1234/diff-cover";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ dzabraev ];
45 };
46}