diff --git a/pkgs/development/python-modules/junos-eznc/default.nix b/pkgs/development/python-modules/junos-eznc/default.nix index e6499c5196d1..35a8e38ec0f0 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 ]; - checkPhase = '' - nosetests -v -a unit --exclude=test_sw_put_ftp - ''; + pytestFlagsArray = [ + "tests/unit" + ]; + + 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 ]; };