2019-08-01 21:23:23 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
|
|
|
, elementpath
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-02-10 22:23:27 +00:00
|
|
|
version = "1.1.0";
|
2019-08-01 21:23:23 +01:00
|
|
|
pname = "xmlschema";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sissaschool";
|
|
|
|
repo = "xmlschema";
|
|
|
|
rev = "v${version}";
|
2020-02-10 22:23:27 +00:00
|
|
|
sha256 = "1h8321jb6q3dhlh3608y3f3sbbzfd3jg1psyirxkrm4w5xs3lbvy";
|
2019-08-01 21:23:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ elementpath ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
2020-01-03 23:17:33 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-02-10 22:23:27 +00:00
|
|
|
--replace "elementpath~=1.4.0" "elementpath~=1.4"
|
2020-01-03 23:17:33 +00:00
|
|
|
'';
|
|
|
|
|
2019-08-01 21:23:23 +01: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 = ''
|
2020-02-10 22:23:27 +00:00
|
|
|
pytest tests \
|
|
|
|
--ignore=tests/test_factory.py \
|
|
|
|
--ignore=tests/test_schemas.py \
|
|
|
|
--ignore=tests/test_memory.py \
|
|
|
|
--ignore=tests/test_validation.py \
|
2019-08-01 21:23:23 +01:00
|
|
|
-k 'not element_tree_import_script'
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|