Skip to content

Commit

Permalink
python312Packages.ansible-runner: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Dec 31, 2024
1 parent 4cb18b6 commit 740ec53
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions pkgs/development/python-modules/ansible-runner/default.nix
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
{
lib,
stdenv,
ansible-core,
buildPythonPackage,
fetchPypi,
glibcLocales,
fetchFromGitHub,

# build-system
setuptools,
setuptools-scm,

# dependencies
packaging,
pexpect,
python-daemon,
pyyaml,
pythonOlder,
importlib-metadata,

# tests
ansible-core,
glibcLocales,
mock,
openssh,
packaging,
pexpect,
pytest-mock,
pytest-timeout,
pytest-xdist,
pytestCheckHook,
pythonOlder,
python-daemon,
pyyaml,
setuptools,
setuptools-scm,
versionCheckHook,
}:

buildPythonPackage rec {
pname = "ansible-runner";
version = "2.4.0";
pyproject = true;

disabled = pythonOlder "3.9";

src = fetchPypi {
inherit pname version;
hash = "sha256-gtArJUiDDzelNRe2XII8SvNxBpQGx9ITtckEHUXgxbY=";
src = fetchFromGitHub {
owner = "ansible";
repo = "ansible-runner";
tag = version;
hash = "sha256-lmaYTdJ7NlaCJ5/CVds6Xzwbe45QXbtS3h8gi5xqvUc=";
};

postPatch = ''
Expand All @@ -53,13 +60,15 @@ buildPythonPackage rec {
nativeCheckInputs = [
ansible-core # required to place ansible CLI onto the PATH in tests
glibcLocales
pytestCheckHook
mock
openssh
pytest-mock
pytest-timeout
pytest-xdist
mock
openssh
pytestCheckHook
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];

preCheck = ''
export HOME=$(mktemp -d)
Expand All @@ -77,10 +86,11 @@ buildPythonPackage rec {
# Failed: DID NOT RAISE <class 'RuntimeError'>
"test_validate_pattern"
# Assertion error
"test_callback_plugin_censoring_does_not_overwrite"
"test_get_role_list"
"test_include_role_from_collection_events"
"test_module_level_no_log"
"test_resolved_actions"
"test_callback_plugin_censoring_does_not_overwrite"
];

disabledTestPaths =
Expand All @@ -98,11 +108,11 @@ buildPythonPackage rec {

pythonImportsCheck = [ "ansible_runner" ];

meta = with lib; {
meta = {
description = "Helps when interfacing with Ansible";
homepage = "https://github.com/ansible/ansible-runner";
changelog = "https://github.com/ansible/ansible-runner/releases/tag/${version}";
license = licenses.asl20;
license = lib.licenses.asl20;
maintainers = [ ];
mainProgram = "ansible-runner";
};
Expand Down

0 comments on commit 740ec53

Please sign in to comment.