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";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.3.13";
|
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;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-JGqYpj5h9UoV0WEFyxVIjFZwc030HobHrw1dnAryQLk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|