Files
nixpkgs/pkgs/development/python-modules/xmlschema/default.nix
T

45 lines
1.1 KiB
Nix
Raw Normal View History

2019-08-01 13:23:23 -07:00
{ lib, buildPythonPackage, fetchFromGitHub
, elementpath
2020-07-07 14:43:54 -07:00
, lxml
2019-08-01 13:23:23 -07:00
, pytest
}:
buildPythonPackage rec {
2021-01-11 18:29:59 -08:00
version = "1.4.1";
2019-08-01 13:23:23 -07:00
pname = "xmlschema";
src = fetchFromGitHub {
owner = "sissaschool";
repo = "xmlschema";
rev = "v${version}";
2021-01-11 18:29:59 -08:00
sha256 = "1yd7whf74z8bw99gldxlnrs8bjnjzald29b5cf2ka0i144sxbvad";
2019-08-01 13:23:23 -07:00
};
propagatedBuildInputs = [ elementpath ];
2020-07-07 14:43:54 -07:00
checkInputs = [ lxml pytest ];
2019-08-01 13:23:23 -07:00
2020-01-03 15:17:33 -08:00
postPatch = ''
substituteInPlace setup.py \
2020-08-15 13:09:46 -07:00
--replace "elementpath~=2.0.0" "elementpath~=2.0"
2020-01-03 15:17:33 -08:00
'';
2019-08-01 13:23:23 -07: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 14:23:27 -08:00
pytest tests \
--ignore=tests/test_factory.py \
--ignore=tests/test_schemas.py \
--ignore=tests/test_memory.py \
--ignore=tests/test_validation.py \
2020-09-29 07:36:05 -07:00
-k 'not element_tree_import_script and not export_remote'
2019-08-01 13:23:23 -07: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 ];
};
}