pythonPackages.junos-eznc: init at 2.1.7

pythonPackages.junos-eznc: init at 2.1.7

pythonPackages.junos-eznc: init at 2.1.7
This commit is contained in:
Xavier Naveira 2018-03-02 15:34:20 +01:00
parent 22c5082aed
commit 1689c3c53f
4 changed files with 71 additions and 13 deletions

View File

@ -0,0 +1,42 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, six
, scp
, pyserial
, paramiko
, netaddr
, ncclient
, lxml
, jinja2
, pyyaml
, nose
}:
buildPythonPackage rec {
pname = "junos-eznc";
version = "2.1.7";
src = fetchPypi {
inherit pname version;
sha256 = "95a037cdd05618a189517357e46a06886909a18c7923b628c6ac43d5f54b2912";
};
checkInputs = [ nose ];
propagatedBuildInputs = [
scp six pyserial paramiko netaddr ncclient lxml jinja2 pyyaml
];
checkPhase = ''
nosetests -v --with-coverage --cover-package=jnpr.junos --cover-inclusive -a unit
'';
meta = with stdenv.lib; {
homepage = http://www.github.com/Juniper/py-junos-eznc;
description = "Junos 'EZ' automation for non-programmers";
license = licenses.asl20;
maintainers = with maintainers; [ xnaveira ];
};
}

View File

@ -1,12 +1,13 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pythonPackages
, setuptools
, paramiko , paramiko
, lxml , lxml
, libxml2 , libxml2
, libxslt , libxslt
, pytest
, nose
, rednose
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -18,11 +19,19 @@ buildPythonPackage rec {
sha256 = "fe6b9c16ed5f1b21f5591da74bfdd91a9bdf69eb4e918f1c06b3c8db307bd32b"; sha256 = "fe6b9c16ed5f1b21f5591da74bfdd91a9bdf69eb4e918f1c06b3c8db307bd32b";
}; };
checkInputs = [ nose rednose ];
buildInputs = [ propagatedBuildInputs = [
setuptools paramiko lxml libxml2 libxslt paramiko lxml libxml2 libxslt
]; ];
checkPhase = ''
nosetests test --rednose --verbosity=3 --with-coverage --cover-package ncclient
'';
#Unfortunately the test hangs at te end
doCheck = false;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://ncclient.org/; homepage = http://ncclient.org/;
description = "Python library for NETCONF clients"; description = "Python library for NETCONF clients";

View File

@ -1,9 +1,8 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pythonPackages
, setuptools
, paramiko , paramiko
, python
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -15,14 +14,20 @@ buildPythonPackage rec {
sha256 = "18f59e48df67fac0b069591609a0f4d50d781a101ddb8ec705f0c2e3501a8386"; sha256 = "18f59e48df67fac0b069591609a0f4d50d781a101ddb8ec705f0c2e3501a8386";
}; };
propagatedBuildInputs = [
buildInputs = [
paramiko paramiko
]; ];
checkPhase = ''
SCPPY_PORT=10022 ${python.interpreter} test.py
'';
#The Pypi package doesn't include the test
doCheck = false;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/jbardin/scp.py; homepage = https://github.com/jbardin/scp.py;
description = "scp module for paramiko"; description = "SCP module for paramiko";
license = licenses.lgpl3; license = licenses.lgpl3;
maintainers = with maintainers; [ xnaveira ]; maintainers = with maintainers; [ xnaveira ];
}; };

View File

@ -452,10 +452,6 @@ in {
python-sybase = callPackage ../development/python-modules/sybase {}; python-sybase = callPackage ../development/python-modules/sybase {};
scp = callPackage ../development/python-modules/scp {};
ncclient = callPackage ../development/python-modules/ncclient {};
alot = buildPythonPackage rec { alot = buildPythonPackage rec {
rev = "0.5.1"; rev = "0.5.1";
name = "alot-${rev}"; name = "alot-${rev}";
@ -5643,6 +5639,8 @@ in {
}; };
}; };
ncclient = callPackage ../development/python-modules/ncclient {};
logfury = callPackage ../development/python-modules/logfury { }; logfury = callPackage ../development/python-modules/logfury { };
ndg-httpsclient = buildPythonPackage rec { ndg-httpsclient = buildPythonPackage rec {
@ -6275,6 +6273,8 @@ in {
}; };
}; };
junos-eznc = callPackage ../development/python-modules/junos-eznc {};
raven = callPackage ../development/python-modules/raven { }; raven = callPackage ../development/python-modules/raven { };
rethinkdb = buildPythonPackage rec { rethinkdb = buildPythonPackage rec {
@ -15327,6 +15327,8 @@ in {
inherit (pkgs) gfortran glibcLocales; inherit (pkgs) gfortran glibcLocales;
}; };
scp = callPackage ../development/python-modules/scp {};
scripttest = buildPythonPackage rec { scripttest = buildPythonPackage rec {
version = "1.3"; version = "1.3";
name = "scripttest-${version}"; name = "scripttest-${version}";