diff --git a/pkgs/development/python-modules/ttp-templates/default.nix b/pkgs/development/python-modules/ttp-templates/default.nix index 46db94782be..45548ee21c2 100644 --- a/pkgs/development/python-modules/ttp-templates/default.nix +++ b/pkgs/development/python-modules/ttp-templates/default.nix @@ -1,11 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, netmiko -, pytestCheckHook -, python , pythonOlder -, ttp }: buildPythonPackage rec { @@ -22,24 +18,14 @@ buildPythonPackage rec { hash = "sha256-Qx+z/srYgD67FjXzYrc8xtA99n8shWK7yWj/r/ETN2U="; }; - propagatedBuildInputs = [ - ttp - ]; + postPatch = '' + # Drop circular dependency on ttp + substituteInPlace setup.py \ + --replace '"ttp>=0.6.0"' "" + ''; - checkInputs = [ - netmiko - pytestCheckHook - ]; - - pythonImportsCheck = [ - "ttp_templates" - ]; - - pytestFlagsArray = [ - # The other tests requires data which is no part of the source - "test/test_ttp_templates_methods.py" - "test/test_yang_openconfig_lldp.py" - ]; + # Circular dependency on ttp + doCheck = false; meta = with lib; { description = "Template Text Parser Templates collections"; diff --git a/pkgs/development/python-modules/ttp/default.nix b/pkgs/development/python-modules/ttp/default.nix index 2157af31811..a484ed9f76a 100644 --- a/pkgs/development/python-modules/ttp/default.nix +++ b/pkgs/development/python-modules/ttp/default.nix @@ -1,22 +1,20 @@ { lib , buildPythonPackage -, callPackage -, fetchFromGitHub , cerberus , configparser , deepdiff +, fetchFromGitHub , geoip2 , jinja2 +, netmiko , openpyxl -, tabulate -, yangson , pytestCheckHook , pyyaml +, tabulate +, ttp-templates +, yangson }: -let - ttp_templates = callPackage ./templates.nix { }; -in buildPythonPackage rec { pname = "ttp"; version = "0.8.4"; @@ -26,7 +24,7 @@ buildPythonPackage rec { owner = "dmulyalin"; repo = pname; rev = version; - sha256 = "sha256-vuKlddqm8KirqAJyvBPfRb5Nw9zo4Fl1bwbfVMhmH9g="; + hash = "sha256-vuKlddqm8KirqAJyvBPfRb5Nw9zo4Fl1bwbfVMhmH9g="; }; propagatedBuildInputs = [ @@ -37,7 +35,7 @@ buildPythonPackage rec { geoip2 jinja2 # n2g unpackaged - # netmiko unpackaged + netmiko # nornir unpackaged openpyxl tabulate @@ -51,7 +49,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pyyaml - ttp_templates + ttp-templates ]; disabledTestPaths = [ @@ -87,6 +85,8 @@ buildPythonPackage rec { "test_TTP_CACHE_FOLDER_env_variable_usage" # requires additional network setup "test_child_group_do_not_start_if_no_parent_started" + # Assertion Error + "test_in_threads_parsing" ]; pytestFlagsArray = [ diff --git a/pkgs/development/python-modules/ttp/templates.nix b/pkgs/development/python-modules/ttp/templates.nix deleted file mode 100644 index 835548d0784..00000000000 --- a/pkgs/development/python-modules/ttp/templates.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -}: - -buildPythonPackage rec { - pname = "ttp-templates"; - version = "0.1.1"; - format = "setuptools"; - - src = fetchPypi { - pname = "ttp_templates"; - inherit version; - sha256 = "0vg7k733i8jqnfz8mpq8kzr2l7b7drk29zkzik91029f6w7li007"; - }; - - # drop circular dependency on ttp - postPatch = '' - substituteInPlace setup.py --replace '"ttp>=0.6.0"' "" - ''; - - # circular dependency on ttp - doCheck = false; - - meta = with lib; { - description = "Template Text Parser Templates"; - homepage = "https://github.com/dmulyalin/ttp_templates"; - license = licenses.mit; - maintainers = with maintainers; [ hexa ]; - }; -}