1{ 2 buildPythonPackage, 3 isPy3k, 4 olm, 5 setuptools, 6 cffi, 7 aspectlib, 8 pytest-benchmark, 9 pytestCheckHook, 10}: 11 12buildPythonPackage { 13 pname = "python-olm"; 14 inherit (olm) src version; 15 pyproject = true; 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 build-system = [ 27 setuptools 28 ]; 29 30 dependencies = [ 31 cffi 32 ]; 33 34 propagatedNativeBuildInputs = [ cffi ]; 35 36 pythonImportsCheck = [ "olm" ]; 37 38 nativeCheckInputs = [ 39 aspectlib 40 pytest-benchmark 41 pytestCheckHook 42 ]; 43 44 pytestFlags = [ "--benchmark-disable" ]; 45 46 meta = { 47 inherit (olm.meta) license maintainers; 48 description = "Python bindings for Olm"; 49 homepage = "https://gitlab.matrix.org/matrix-org/olm/tree/master/python"; 50 }; 51}