Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / xmlschema / default.nix
blobe31054e74c1393b06ccf973ae7f9dac41708a21c
1 { lib, buildPythonPackage, fetchFromGitHub
2 , elementpath
3 , lxml
4 , pytest
5 }:
7 buildPythonPackage rec {
8   version = "1.4.1";
9   pname = "xmlschema";
11   src = fetchFromGitHub {
12     owner = "sissaschool";
13     repo = "xmlschema";
14     rev = "v${version}";
15     sha256 = "1yd7whf74z8bw99gldxlnrs8bjnjzald29b5cf2ka0i144sxbvad";
16   };
18   propagatedBuildInputs = [ elementpath ];
20   checkInputs = [ lxml pytest ];
22   postPatch = ''
23     substituteInPlace setup.py \
24       --replace "elementpath~=2.0.0" "elementpath~=2.0"
25   '';
27   # Ignore broken fixtures, and tests for files which don't exist.
28   # For darwin, we need to explicity say we can't reach network
29   checkPhase = ''
30     pytest tests \
31       --ignore=tests/test_factory.py \
32       --ignore=tests/test_schemas.py \
33       --ignore=tests/test_memory.py \
34       --ignore=tests/test_validation.py \
35       -k 'not element_tree_import_script and not export_remote'
36   '';
38   meta = with lib; {
39     description = "XML Schema validator and data conversion library for Python";
40     homepage = "https://github.com/sissaschool/xmlschema";
41     license = licenses.mit;
42     maintainers = with maintainers; [ jonringer ];
43   };