1{ lib, buildPythonPackage, fetchFromGitHub
2, elementpath
3, lxml
4, pytest
5}:
6
7buildPythonPackage rec {
8 version = "1.6.2";
9 pname = "xmlschema";
10
11 src = fetchFromGitHub {
12 owner = "sissaschool";
13 repo = "xmlschema";
14 rev = "v${version}";
15 sha256 = "sha256-GL2PlHxKDSEsZwHPBAy+tjBSbKyvlbXUWwXakKPmzSs=";
16 };
17
18 propagatedBuildInputs = [ elementpath ];
19
20 checkInputs = [ lxml pytest ];
21
22 # Ignore broken fixtures, and tests for files which don't exist.
23 # For darwin, we need to explicity say we can't reach network
24 checkPhase = ''
25 pytest tests \
26 --ignore=tests/test_factory.py \
27 --ignore=tests/test_schemas.py \
28 --ignore=tests/test_memory.py \
29 --ignore=tests/test_validation.py \
30 -k 'not element_tree_import_script and not export_remote'
31 '';
32
33 meta = with lib; {
34 description = "XML Schema validator and data conversion library for Python";
35 homepage = "https://github.com/sissaschool/xmlschema";
36 license = licenses.mit;
37 maintainers = with maintainers; [ jonringer ];
38 };
39}