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