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