summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-07-09 19:50:19 +0200
committerGitHub <noreply@github.com>2023-07-09 19:50:19 +0200
commit2b356dae6208d422236c4cdc48f3bed749f9daea (patch)
tree6878f7c954ccd0d0bd5d42a3c234dc0ca7176388
parent86ab77fc2e9cff7f0cd3520843ab384917b79026 (diff)
parentbc36fadf84703d25b1f28b82baaedf8d4e3abb21 (diff)
downloadnixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar.gz
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar.bz2
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar.lz
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar.xz
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.tar.zst
nixpkgs-2b356dae6208d422236c4cdc48f3bed749f9daea.zip
Merge pull request #240818 from tjni/ansible-runner
python310Packages.ansible-runner: 2.3.1 -> 2.3.3
-rw-r--r--pkgs/development/python-modules/ansible-runner/default.nix23
-rw-r--r--pkgs/development/python-modules/ansible/core.nix15
2 files changed, 30 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix
index dd136f0d7c3..ec64e2919e2 100644
--- a/pkgs/development/python-modules/ansible-runner/default.nix
+++ b/pkgs/development/python-modules/ansible-runner/default.nix
@@ -3,7 +3,9 @@
 , ansible-core
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , glibcLocales
+, importlib-metadata
 , mock
 , openssh
 , pbr
@@ -21,16 +23,25 @@
 
 buildPythonPackage rec {
   pname = "ansible-runner";
-  version = "2.3.1";
+  version = "2.3.3";
   format = "setuptools";
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-HS8C06Ylc/OOaKI3kBGLeYF5HCvtK18i96NqIhwoh1Y=";
+    hash = "sha256-OP9jXkuUeR3ilWyB4mWDbsSWWzDp7jXXL88ycdxGuYs=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "fix-tests.patch";
+      url = "https://github.com/ansible/ansible-runner/commit/0d522c90cfc1f305e118705a1b3335ccb9c1633d.patch";
+      hash = "sha256-eTnQkftvjK0YHU+ovotRVSuVlvaVeXp5SvYk1DPCg88=";
+      excludes = [ ".github/workflows/ci.yml" "tox.ini" ];
+    })
+  ];
+
   nativeBuildInputs = [
     pbr
   ];
@@ -42,6 +53,8 @@ buildPythonPackage rec {
     python-daemon
     pyyaml
     six
+  ] ++ lib.optionals (pythonOlder "3.10") [
+    importlib-metadata
   ];
 
   nativeCheckInputs = [
@@ -70,10 +83,6 @@ buildPythonPackage rec {
     "test_large_stdout_blob"
     # Failed: DID NOT RAISE <class 'RuntimeError'>
     "test_validate_pattern"
-  ] ++ lib.optionals stdenv.isDarwin [
-    # test_process_isolation_settings is currently broken on Darwin Catalina
-    # https://github.com/ansible/ansible-runner/issues/413
-    "process_isolation_settings"
   ];
 
   disabledTestPaths = [
diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix
index 50c67f8f290..4e95959127e 100644
--- a/pkgs/development/python-modules/ansible/core.nix
+++ b/pkgs/development/python-modules/ansible/core.nix
@@ -1,9 +1,12 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, pythonOlder
+, pythonRelaxDepsHook
 , installShellFiles
 , ansible
 , cryptography
+, importlib-resources
 , jinja2
 , junit-xml
 , lxml
@@ -41,6 +44,8 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [
     installShellFiles
+  ] ++ lib.optionals (pythonOlder "3.10") [
+    pythonRelaxDepsHook
   ];
 
   propagatedBuildInputs = [
@@ -64,7 +69,15 @@ buildPythonPackage rec {
     requests
     scp
     xmltodict
-  ] ++ lib.optional windowsSupport pywinrm;
+  ] ++ lib.optionals windowsSupport [
+    pywinrm
+  ] ++ lib.optionals (pythonOlder "3.10") [
+    importlib-resources
+  ];
+
+  pythonRelaxDeps = lib.optionals (pythonOlder "3.10") [
+    "importlib-resources"
+  ];
 
   postInstall = ''
     installManPage docs/man/man1/*.1