1{ lib, stdenv
2, buildPythonPackage
3, fetchPypi
4, mock
5, pytest
6, pytest-mock
7, pytz
8, requests
9, requests-kerberos
10, toml
11}:
12
13buildPythonPackage rec {
14 pname = "jenkinsapi";
15 version = "0.3.11";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "a212a244b0a6022a61657746c8120ac9b6db83432371b345154075eb8faceb61";
20 };
21
22 propagatedBuildInputs = [ pytz requests ];
23 checkInputs = [ mock pytest pytest-mock requests-kerberos toml ];
24 # TODO requests-kerberos is broken on darwin, weeding out the broken tests without
25 # access to macOS is not an adventure I am ready to embark on - @rski
26 doCheck = !stdenv.isDarwin;
27 # don't run tests that try to spin up jenkins, and a few more that are mysteriously broken
28 checkPhase = ''
29 py.test jenkinsapi_tests \
30 -k "not systests and not test_plugins and not test_view"
31 '';
32
33 meta = with lib; {
34 description = "A Python API for accessing resources on a Jenkins continuous-integration server";
35 homepage = "https://github.com/salimfadhley/jenkinsapi";
36 maintainers = with maintainers; [ drets ];
37 license = licenses.mit;
38 };
39
40}