1{ lib
2, fetchPypi
3, buildPythonPackage
4, pytestCheckHook
5, libxslt
6, libxml2
7, libtool
8, pkg-config
9, xmlsec
10, pkgconfig
11, setuptools-scm
12, toml
13, lxml
14, hypothesis
15}:
16
17buildPythonPackage rec {
18 pname = "xmlsec";
19 version = "1.3.9";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "1c4k42zv3plm6v65p7z6l5rxyf50h40d02nhc16vq7cjrfvdf4rx";
24 };
25
26 # https://github.com/mehcode/python-xmlsec/issues/84#issuecomment-632930116
27 patches = [
28 ./reset-lxml-in-tests.patch
29 ];
30
31 nativeBuildInputs = [ pkg-config pkgconfig setuptools-scm toml ];
32
33 buildInputs = [ xmlsec libxslt libxml2 libtool ];
34
35 propagatedBuildInputs = [ lxml ];
36
37 # Full git clone required for test_doc_examples
38 checkInputs = [ pytestCheckHook hypothesis ];
39 disabledTestPaths = [ "tests/test_doc_examples.py" ];
40
41 meta = with lib; {
42 description = "Python bindings for the XML Security Library";
43 homepage = "https://github.com/mehcode/python-xmlsec";
44 license = licenses.mit;
45 maintainers = with maintainers; [ zhaofengli ];
46 };
47}