2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mock
|
|
|
|
, pbr
|
|
|
|
, pyyaml
|
|
|
|
, setuptools
|
|
|
|
, six
|
|
|
|
, multi_key_dict
|
|
|
|
, testscenarios
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
2022-06-26 10:26:21 +00:00
|
|
|
, stestr
|
2023-10-09 19:29:22 +00:00
|
|
|
, multiprocess
|
|
|
|
, pythonRelaxDepsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-jenkins";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-/18dklOdkD+GmwLq8rExREfm1tePdn7c/dkpZ9UyucY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# test uses timeout mechanism unsafe for use with the "spawn"
|
|
|
|
# multiprocessing backend used on macos
|
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace tests/test_jenkins_sockets.py \
|
|
|
|
--replace test_jenkins_open_no_timeout dont_test_jenkins_open_no_timeout
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"setuptools"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ mock ];
|
|
|
|
propagatedBuildInputs = [ pbr pyyaml setuptools six multi_key_dict requests ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeCheckInputs = [ stestr testscenarios requests-mock multiprocess ];
|
|
|
|
checkPhase = ''
|
|
|
|
# Skip tests that fail due to setuptools>=66.0.0 rejecting PEP 440
|
|
|
|
# non-conforming versions. See
|
|
|
|
# https://github.com/pypa/setuptools/issues/2497 for details.
|
|
|
|
stestr run -E "tests.test_plugins.(PluginsTestScenarios.test_plugin_version_comparison|PluginsTestScenarios.test_plugin_version_object_comparison|PluginsTest.test_plugin_equal|PluginsTest.test_plugin_not_equal)"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for the remote Jenkins API";
|
|
|
|
homepage = "https://pypi.python.org/pypi/python-jenkins";
|
|
|
|
license = licenses.bsd3;
|
2022-06-26 10:26:21 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|