diff options
Diffstat (limited to 'pkgs/development/python-modules/napalm/hp-procurve.nix')
-rw-r--r-- | pkgs/development/python-modules/napalm/hp-procurve.nix | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/napalm/hp-procurve.nix b/pkgs/development/python-modules/napalm/hp-procurve.nix index 87dad04cf781..6402005bed6e 100644 --- a/pkgs/development/python-modules/napalm/hp-procurve.nix +++ b/pkgs/development/python-modules/napalm/hp-procurve.nix @@ -5,6 +5,7 @@ , netmiko , pip , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { @@ -12,32 +13,37 @@ buildPythonPackage rec { version = "0.7.0"; format = "setuptools"; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "napalm-automation-community"; - repo = pname; - rev = version; + repo = "napalm-hp-procurve"; + rev = "refs/tags/${version}"; hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M="; }; - nativeBuildInputs = [ - pip - ]; - - # dependency installation in setup.py doesn't work patchPhase = '' + # Dependency installation in setup.py doesn't work echo -n > requirements.txt + substituteInPlace setup.cfg \ + --replace "--cov=napalm_procurve --cov-report term-missing -vs --pylama" "" ''; - buildInputs = [ napalm ]; + nativeBuildInputs = [ + pip + ]; - propagatedBuildInputs = [ netmiko ]; + buildInputs = [ + napalm + ]; - # setup.cfg seems to contain invalid pytest parameters - preCheck = '' - rm setup.cfg - ''; + propagatedBuildInputs = [ + netmiko + ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + ]; disabledTests = [ # AssertionError: Some methods vary. @@ -46,6 +52,11 @@ buildPythonPackage rec { "test_get_config_filtered" # AssertionError "test_get_interfaces" + "test_get_facts" + ]; + + pythonImportsCheck = [ + "napalm_procurve" ]; meta = with lib; { |