diff options
Diffstat (limited to 'pkgs/development/python-modules/coveralls/default.nix')
-rw-r--r-- | pkgs/development/python-modules/coveralls/default.nix | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/coveralls/default.nix b/pkgs/development/python-modules/coveralls/default.nix index 2e2e23e44d653..c59dd631bf089 100644 --- a/pkgs/development/python-modules/coveralls/default.nix +++ b/pkgs/development/python-modules/coveralls/default.nix @@ -1,57 +1,62 @@ { buildPythonPackage, lib, - fetchPypi, - isPy27, + fetchFromGitHub, + + # build-system + poetry-core, + + # checks mock, - pytest, - pytest-runner, + pytestCheckHook, sh, coverage, docopt, requests, - urllib3, git, - isPy3k, + responses, }: buildPythonPackage rec { pname = "coveralls"; - version = "3.3.1"; - format = "setuptools"; - disabled = isPy27; - - # wanted by tests - src = fetchPypi { - inherit pname version; - sha256 = "b32a8bb5d2df585207c119d6c01567b81fba690c9c10a753bfe27a335bfc43ea"; + version = "4.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "TheKevJames"; + repo = "coveralls-python"; + rev = "refs/tags/${version}"; + hash = "sha256-1MjP99NykWNDyzWwZopLAzZ93vGX1mXEU+m+zvOBIZA="; }; + build-system = [ poetry-core ]; + + dependencies = [ + coverage + docopt + requests + ]; + nativeCheckInputs = [ mock sh - pytest + pytestCheckHook + responses git ]; - buildInputs = [ pytest-runner ]; - - postPatch = '' - sed -i "s/'coverage>=\([^,]\+\),.*',$/'coverage>=\1',/" setup.py - ''; - - # FIXME: tests requires .git directory to be present - doCheck = false; - - checkPhase = '' - python setup.py test + preCheck = '' + export PATH=${coverage}/bin:$PATH ''; - propagatedBuildInputs = [ - coverage - docopt - requests - ] ++ lib.optional (!isPy3k) urllib3; + disabledTests = [ + # requires .git in checkout + "test_git" + # try to run unwrapped python + "test_5" + "test_7" + "test_11" + ]; meta = { description = "Show coverage stats online via coveralls.io"; |