python3.pkgs.napalm-hp-procurve: add pip dependency and other improvements

This commit is contained in:
Theodore Ni 2023-08-22 23:05:15 -07:00
parent 4e481477c1
commit 3e173827d7
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474

View File

@ -1,30 +1,44 @@
{ lib, buildPythonPackage, fetchFromGitHub, setuptools, napalm, netmiko
, pytestCheckHook }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, napalm
, netmiko
, pip
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "napalm-hp-procurve";
version = "0.7.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "napalm-automation-community";
repo = pname;
rev = version;
sha256 = "1lspciddkd1w5lfyz35i0qwgpbn5jq9cbqkwjbsvi4kliz229vkh";
hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M=";
};
nativeBuildInputs = [
pip
];
# dependency installation in setup.py doesn't work
patchPhase = ''
echo -n > requirements.txt
'';
buildInputs = [ setuptools napalm ];
buildInputs = [ napalm ];
propagatedBuildInputs = [ netmiko ];
# setup.cfg seems to contain invalid pytest parameters
preCheck = ''
rm setup.cfg
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# AssertionError: Some methods vary.
"test_method_signatures"