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