2019-02-24 23:06:53 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, psutil
|
|
|
|
, pexpect
|
|
|
|
, python-daemon
|
|
|
|
, pyyaml
|
|
|
|
, six
|
2020-02-19 04:42:40 +01:00
|
|
|
, stdenv
|
2019-02-24 23:06:53 +01:00
|
|
|
, ansible
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-runner";
|
2021-02-20 10:09:07 +01:00
|
|
|
version = "1.4.7";
|
2019-02-24 23:06:53 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 10:09:07 +01:00
|
|
|
sha256 = "1bb56f9061c3238d89ec8871bc842f5b8d0e868f892347e8455c98d5b6fa58a1";
|
2019-02-24 23:06:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest mock ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ansible
|
|
|
|
psutil
|
|
|
|
pexpect
|
|
|
|
python-daemon
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2020-02-19 04:42:40 +01:00
|
|
|
# test_process_isolation_settings is currently broken on Darwin Catalina
|
|
|
|
# https://github.com/ansible/ansible-runner/issues/413
|
2019-02-24 23:06:53 +01:00
|
|
|
checkPhase = ''
|
2020-02-19 04:42:40 +01:00
|
|
|
HOME=$TMPDIR pytest \
|
|
|
|
--ignore test/unit/test_runner.py \
|
|
|
|
-k "not prepare ${lib.optionalString stdenv.isDarwin "and not process_isolation_settings"}"
|
2019-02-24 23:06:53 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Helps when interfacing with Ansible";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ansible/ansible-runner";
|
2019-02-24 23:06:53 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|