2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, elementpath
|
2020-07-18 16:06:22 +00:00
|
|
|
, lxml
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "1.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xmlschema";
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sissaschool";
|
|
|
|
repo = "xmlschema";
|
|
|
|
rev = "v${version}";
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "1k41zzffg9srhgnvi1s1akaqpwz2z003xbvig8axwlkm7z0d4xiz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
elementpath
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
checkInputs = [
|
|
|
|
lxml
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Ignore broken fixtures, and tests for files which don't exist.
|
|
|
|
# For darwin, we need to explicity say we can't reach network
|
2021-09-18 10:52:07 +00:00
|
|
|
disabledTests = [
|
|
|
|
"export_remote"
|
|
|
|
"element_tree_import_script"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_schemas.py"
|
|
|
|
"tests/test_memory.py"
|
|
|
|
"tests/test_validation.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xmlschema" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "XML Schema validator and data conversion library for Python";
|
|
|
|
homepage = "https://github.com/sissaschool/xmlschema";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|