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