1{ lib
2, atpublic
3, attrs
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-mock
7, pytestCheckHook
8, pythonOlder
9, typing-extensions
10}:
11
12buildPythonPackage rec {
13 pname = "aiosmtpd";
14 version = "1.4.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "aio-libs";
21 repo = pname;
22 rev = version;
23 sha256 = "0hbpyns1j1fpvpj7gyb8cz359j7l4hzfqbig74xp4xih59sih0wj";
24 };
25
26 propagatedBuildInputs = [
27 atpublic
28 attrs
29 ] ++ lib.optionals (pythonOlder "3.8") [
30 typing-extensions
31 ];
32
33 checkInputs = [
34 pytest-mock
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # Requires git
40 "test_ge_master"
41 # Seems to be a sandbox issue
42 "test_byclient"
43 ];
44
45 pythonImportsCheck = [
46 "aiosmtpd"
47 ];
48
49 meta = with lib; {
50 description = "Asyncio based SMTP server";
51 homepage = "https://aiosmtpd.readthedocs.io/";
52 longDescription = ''
53 This is a server for SMTP and related protocols, similar in utility to the
54 standard library's smtpd.py module.
55 '';
56 license = licenses.asl20;
57 maintainers = with maintainers; [ eadwu ];
58 };
59}