Merge pull request #173579 from fabaff/ttp-dup
python310Packages.ttp: use ttp-templates from modules
This commit is contained in:
commit
04c522fce3
@ -1,11 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, netmiko
|
|
||||||
, pytestCheckHook
|
|
||||||
, python
|
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, ttp
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -22,24 +18,14 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-Qx+z/srYgD67FjXzYrc8xtA99n8shWK7yWj/r/ETN2U=";
|
hash = "sha256-Qx+z/srYgD67FjXzYrc8xtA99n8shWK7yWj/r/ETN2U=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
postPatch = ''
|
||||||
ttp
|
# Drop circular dependency on ttp
|
||||||
];
|
substituteInPlace setup.py \
|
||||||
|
--replace '"ttp>=0.6.0"' ""
|
||||||
|
'';
|
||||||
|
|
||||||
checkInputs = [
|
# Circular dependency on ttp
|
||||||
netmiko
|
doCheck = false;
|
||||||
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"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Template Text Parser Templates collections";
|
description = "Template Text Parser Templates collections";
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, callPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, cerberus
|
, cerberus
|
||||||
, configparser
|
, configparser
|
||||||
, deepdiff
|
, deepdiff
|
||||||
|
, fetchFromGitHub
|
||||||
, geoip2
|
, geoip2
|
||||||
, jinja2
|
, jinja2
|
||||||
|
, netmiko
|
||||||
, openpyxl
|
, openpyxl
|
||||||
, tabulate
|
|
||||||
, yangson
|
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pyyaml
|
, pyyaml
|
||||||
|
, tabulate
|
||||||
|
, ttp-templates
|
||||||
|
, yangson
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
ttp_templates = callPackage ./templates.nix { };
|
|
||||||
in
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ttp";
|
pname = "ttp";
|
||||||
version = "0.8.4";
|
version = "0.8.4";
|
||||||
@ -26,7 +24,7 @@ buildPythonPackage rec {
|
|||||||
owner = "dmulyalin";
|
owner = "dmulyalin";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-vuKlddqm8KirqAJyvBPfRb5Nw9zo4Fl1bwbfVMhmH9g=";
|
hash = "sha256-vuKlddqm8KirqAJyvBPfRb5Nw9zo4Fl1bwbfVMhmH9g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -37,7 +35,7 @@ buildPythonPackage rec {
|
|||||||
geoip2
|
geoip2
|
||||||
jinja2
|
jinja2
|
||||||
# n2g unpackaged
|
# n2g unpackaged
|
||||||
# netmiko unpackaged
|
netmiko
|
||||||
# nornir unpackaged
|
# nornir unpackaged
|
||||||
openpyxl
|
openpyxl
|
||||||
tabulate
|
tabulate
|
||||||
@ -51,7 +49,7 @@ buildPythonPackage rec {
|
|||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
pyyaml
|
pyyaml
|
||||||
ttp_templates
|
ttp-templates
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
@ -87,6 +85,8 @@ buildPythonPackage rec {
|
|||||||
"test_TTP_CACHE_FOLDER_env_variable_usage"
|
"test_TTP_CACHE_FOLDER_env_variable_usage"
|
||||||
# requires additional network setup
|
# requires additional network setup
|
||||||
"test_child_group_do_not_start_if_no_parent_started"
|
"test_child_group_do_not_start_if_no_parent_started"
|
||||||
|
# Assertion Error
|
||||||
|
"test_in_threads_parsing"
|
||||||
];
|
];
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
|
@ -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 ];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user