Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 40 lines 1.2 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub 2, elementpath 3, pytest 4}: 5 6buildPythonPackage rec { 7 version = "1.0.18"; 8 pname = "xmlschema"; 9 10 src = fetchFromGitHub { 11 owner = "sissaschool"; 12 repo = "xmlschema"; 13 rev = "v${version}"; 14 sha256 = "1pwq2sfh7klcxismsqzgw80cp3cdkq9wv8x9g3h1zx1p66xpas9p"; 15 }; 16 17 propagatedBuildInputs = [ elementpath ]; 18 19 checkInputs = [ pytest ]; 20 21 # Ignore broken fixtures, and tests for files which don't exist. 22 # For darwin, we need to explicity say we can't reach network 23 checkPhase = '' 24 substituteInPlace xmlschema/tests/__init__.py \ 25 --replace "SKIP_REMOTE_TESTS = " "SKIP_REMOTE_TESTS = True #" 26 pytest . \ 27 --ignore=xmlschema/tests/test_factory.py \ 28 --ignore=xmlschema/tests/test_memory.py \ 29 --ignore=xmlschema/tests/test_validators.py \ 30 --ignore=xmlschema/tests/test_schemas.py \ 31 -k 'not element_tree_import_script' 32 ''; 33 34 meta = with lib; { 35 description = "XML Schema validator and data conversion library for Python"; 36 homepage = "https://github.com/sissaschool/xmlschema"; 37 license = licenses.mit; 38 maintainers = with maintainers; [ jonringer ]; 39 }; 40}