Merge pull request #280735 from fabaff/junos-eznc-fix

python311Packages.junos-eznc: 2.6.8 -> 2.7.0
This commit is contained in:
Fabian Affolter 2024-01-14 09:58:14 +01:00 committed by GitHub
commit d31cd1bfa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ];
};