2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2018-10-29 17:54:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-06-26 01:54:00 +01:00
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, pytest-mock
|
2018-10-29 17:54:45 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
2020-06-26 01:54:00 +01:00
|
|
|
, requests-kerberos
|
|
|
|
, toml
|
2018-10-29 17:54:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jenkinsapi";
|
2019-11-19 14:35:36 +00:00
|
|
|
version = "0.3.11";
|
2018-10-29 17:54:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-11-19 14:35:36 +00:00
|
|
|
sha256 = "a212a244b0a6022a61657746c8120ac9b6db83432371b345154075eb8faceb61";
|
2018-10-29 17:54:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pytz requests ];
|
2020-06-26 01:54:00 +01:00
|
|
|
checkInputs = [ mock pytest pytest-mock requests-kerberos toml ];
|
|
|
|
# TODO requests-kerberos is broken on darwin, weeding out the broken tests without
|
|
|
|
# access to macOS is not an adventure I am ready to embark on - @rski
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
# don't run tests that try to spin up jenkins, and a few more that are mysteriously broken
|
|
|
|
checkPhase = ''
|
|
|
|
py.test jenkinsapi_tests \
|
|
|
|
-k "not systests and not test_plugins and not test_view"
|
|
|
|
'';
|
2018-10-29 17:54:45 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-29 17:54:45 +00:00
|
|
|
description = "A Python API for accessing resources on a Jenkins continuous-integration server";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/salimfadhley/jenkinsapi";
|
2018-10-29 17:54:45 +00:00
|
|
|
maintainers = with maintainers; [ drets ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|