2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
|
|
|
, elementpath
|
2020-07-18 16:06:22 +00:00
|
|
|
, lxml
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-08-25 08:27:29 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xmlschema";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sissaschool";
|
|
|
|
repo = "xmlschema";
|
|
|
|
rev = "v${version}";
|
2021-08-25 08:27:29 +00:00
|
|
|
sha256 = "0vf0gj1sbv9f7gjm3zbyl0b8pkrn00yzx57ddff0h2kazv8jlpwi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ elementpath ];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
checkInputs = [ lxml pytest ];
|
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
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests \
|
|
|
|
--ignore=tests/test_factory.py \
|
|
|
|
--ignore=tests/test_schemas.py \
|
|
|
|
--ignore=tests/test_memory.py \
|
|
|
|
--ignore=tests/test_validation.py \
|
2020-10-07 09:15:18 +00:00
|
|
|
-k 'not element_tree_import_script and not export_remote'
|
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 ];
|
|
|
|
};
|
|
|
|
}
|