1{
2 buildPythonPackage,
3 isPy3k,
4 olm,
5 cffi,
6 future,
7 aspectlib,
8 pytest-benchmark,
9 pytestCheckHook,
10}:
11
12buildPythonPackage {
13 pname = "python-olm";
14 format = "setuptools";
15 inherit (olm) src version;
16
17 disabled = !isPy3k;
18
19 sourceRoot = "${olm.src.name}/python";
20 buildInputs = [ olm ];
21
22 preBuild = ''
23 make include/olm/olm.h
24 '';
25
26 propagatedBuildInputs = [
27 cffi
28 future
29 ];
30
31 propagatedNativeBuildInputs = [ cffi ];
32
33 pythonImportsCheck = [ "olm" ];
34
35 nativeCheckInputs = [
36 aspectlib
37 pytest-benchmark
38 pytestCheckHook
39 ];
40
41 meta = {
42 inherit (olm.meta) license maintainers;
43 description = "Python bindings for Olm";
44 homepage = "https://gitlab.matrix.org/matrix-org/olm/tree/master/python";
45 };
46}