about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2024-01-14 09:58:14 +0100
committerGitHub <noreply@github.com>2024-01-14 09:58:14 +0100
commitd31cd1bfa47a8840b1ed44cd988dbdba1352cbc1 (patch)
tree8e6738204a49bd313fa90d87bf78e4900f222112 /pkgs/development
parentabde03c6b3d19be0a69c57e5a1f475b03a09dd71 (diff)
parentc54eba8a6c18de53a2caf02c12be546fadf6f3b1 (diff)
Merge pull request #280735 from fabaff/junos-eznc-fix
python311Packages.junos-eznc: 2.6.8 -> 2.7.0
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/junos-eznc/default.nix43
1 files changed, 27 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/junos-eznc/default.nix b/pkgs/development/python-modules/junos-eznc/default.nix
index e6499c5196d1d..35a8e38ec0f0d 100644
--- a/pkgs/development/python-modules/junos-eznc/default.nix
+++ b/pkgs/development/python-modules/junos-eznc/default.nix
@@ -1,13 +1,12 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, fetchpatch
 , jinja2
 , lxml
 , mock
 , ncclient
 , netaddr
-, nose
+, nose2
 , ntc-templates
 , paramiko
 , pyparsing
@@ -15,6 +14,8 @@
 , pythonOlder
 , pyyaml
 , scp
+, setuptools
+, pytestCheckHook
 , six
 , transitions
 , yamlordereddictloader
@@ -22,23 +23,21 @@
 
 buildPythonPackage rec {
   pname = "junos-eznc";
-  version = "2.6.8";
-  format = "setuptools";
+  version = "2.7.0";
+  pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "Juniper";
     repo = "py-junos-eznc";
     rev = "refs/tags/${version}";
-    hash = "sha256-5xZjuU2U3BodAMQiWZIJ27AZiAwoMm4yJ4qr3DjMd9o=";
+    hash = "sha256-06OV6UrF2i4SxL5dCvVxsEX2e8ef8UBFx/oMbvCZDaM=";
   };
 
-  postPatch = ''
-    # https://github.com/Juniper/py-junos-eznc/issues/1236
-    substituteInPlace lib/jnpr/junos/utils/scp.py \
-      --replace "inspect.getargspec" "inspect.getfullargspec"
-  '';
+  nativeBuildInputs = [
+    setuptools
+  ];
 
   propagatedBuildInputs = [
     jinja2
@@ -58,21 +57,33 @@ buildPythonPackage rec {
 
   nativeCheckInputs = [
     mock
-    nose
+    nose2
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [
+   "tests/unit"
   ];
 
-  checkPhase = ''
-    nosetests -v -a unit --exclude=test_sw_put_ftp
-  '';
+  disabledTests = [
+    # jnpr.junos.exception.FactLoopError: A loop was detected while gathering the...
+    "TestPersonality"
+    "TestGetSoftwareInformation"
+    "TestIfdStyle"
+    # KeyError: 'mac'
+    "test_textfsm_table_mutli_key"
+    # AssertionError: None != 'juniper.net'
+    "test_domain_fact_from_config"
+  ];
 
   pythonImportsCheck = [
     "jnpr.junos"
   ];
 
   meta = with lib; {
-    changelog = "https://github.com/Juniper/py-junos-eznc/releases/tag/${version}";
     description = "Junos 'EZ' automation for non-programmers";
     homepage = "https://github.com/Juniper/py-junos-eznc";
+    changelog = "https://github.com/Juniper/py-junos-eznc/releases/tag/${version}";
     license = licenses.asl20;
     maintainers = with maintainers; [ xnaveira ];
   };