1{ buildPythonPackage
2, lib
3, fetchPypi
4, mock
5, pytest
6, pytestrunner
7, sh
8, coverage
9, docopt
10, requests
11, urllib3
12, git
13, isPy3k
14}:
15
16buildPythonPackage rec {
17 pname = "coveralls";
18 name = "${pname}-python-${version}";
19 version = "1.2.0";
20
21 # wanted by tests
22 src = fetchPypi {
23 inherit pname version;
24 sha256 = "510682001517bcca1def9f6252df6ce730fcb9831c62d9fff7c7d55b6fdabdf3";
25 };
26
27 checkInputs = [
28 mock
29 sh
30 pytest
31 git
32 ];
33
34 buildInputs = [
35 pytestrunner
36 ];
37
38 # FIXME: tests requires .git directory to be present
39 doCheck = false;
40
41 checkPhase = ''
42 python setup.py test
43 '';
44
45 propagatedBuildInputs = [
46 coverage
47 docopt
48 requests
49 ] ++ lib.optional (!isPy3k) urllib3;
50
51 meta = {
52 description = "Show coverage stats online via coveralls.io";
53 homepage = https://github.com/coveralls-clients/coveralls-python;
54 license = lib.licenses.mit;
55 };
56}
57
58