1{ lib
2, buildPythonPackage
3, isPy27
4, setuptools-scm
5, libdeltachat
6, cffi
7, imapclient
8, pluggy
9, requests
10, setuptools
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "deltachat";
16 inherit (libdeltachat) version src;
17 sourceRoot = "${src.name}/python";
18
19 disabled = isPy27;
20
21 nativeBuildInputs = [
22 setuptools-scm
23 ];
24
25 SETUPTOOLS_SCM_PRETEND_VERSION = version;
26
27 buildInputs = [
28 libdeltachat
29 ];
30
31 propagatedBuildInputs = [
32 cffi
33 imapclient
34 pluggy
35 requests
36 setuptools
37 ];
38
39 checkInputs = [
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [
44 "deltachat"
45 "deltachat.account"
46 "deltachat.contact"
47 "deltachat.chat"
48 "deltachat.message"
49 ];
50
51 meta = with lib; {
52 description = "Python bindings for the Delta Chat Core library";
53 homepage = "https://github.com/deltachat/deltachat-core-rust/tree/master/python";
54 changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/python/CHANGELOG";
55 license = licenses.mpl20;
56 maintainers = with maintainers; [ dotlambda ];
57 };
58}