2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-05-18 14:49:53 +00:00
|
|
|
, pythonAtLeast
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2020-09-25 04:45:31 +00:00
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, pytest-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
2020-09-25 04:45:31 +00:00
|
|
|
, requests-kerberos
|
|
|
|
, toml
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jenkinsapi";
|
|
|
|
version = "0.3.11";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonAtLeast "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "a212a244b0a6022a61657746c8120ac9b6db83432371b345154075eb8faceb61";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pytz requests ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ mock pytest pytest-mock requests-kerberos toml ];
|
2020-09-25 04:45:31 +00:00
|
|
|
# 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"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python API for accessing resources on a Jenkins continuous-integration server";
|
|
|
|
homepage = "https://github.com/salimfadhley/jenkinsapi";
|
|
|
|
maintainers = with maintainers; [ drets ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|