about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aioxmpp/default.nix
blob: e753cb6c63dcff84b139064a48994f960f375238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
  lib,
  aioopenssl,
  aiosasl,
  babel,
  buildPythonPackage,
  dnspython,
  fetchFromGitHub,
  lxml,
  multidict,
  pyasn1-modules,
  pyasn1,
  pyopenssl,
  pytestCheckHook,
  pythonAtLeast,
  pythonOlder,
  pytz,
  setuptools,
  sortedcollections,
  tzlocal,
}:

buildPythonPackage rec {
  pname = "aioxmpp";
  version = "0.13.3";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "horazont";
    repo = "aioxmpp";
    rev = "refs/tags/v${version}";
    hash = "sha256-bQPKEM5eKhFI3Kx3U1espdxqjnG4yUgOXmYCrd98PDo=";
  };

  pythonRelaxDeps = [
    "lxml"
  ];

  build-system = [ setuptools ];


  dependencies = [
    aiosasl
    aioopenssl
    babel
    dnspython
    lxml
    multidict
    pyasn1
    pyasn1-modules
    pyopenssl
    pytz
    sortedcollections
    tzlocal
  ];

  pythonImportsCheck = [
    "aioxmpp"
    "aioxmpp.node"
    "aioxmpp.security_layer"
    "aioxmpp.stanza"
    "aioxmpp.stream"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTestPaths = [ "benchmarks" ];

  disabledTests = [
    # AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'normalize'
    "test_convert_field_datetime_default_locale"
  ] ++ lib.optionals (pythonAtLeast "3.12") [
    # asyncio issues
    "test_is_abstract"
    "Testbackground"
    "TestCapturingXSO"
    "Testcheck_x509"
    "TestClient"
    "TestIntegerType"
    "TestStanzaStream"
    "TestStanzaToken"
    "TestXMLStream"
  ];

  meta = {
    description = "Pure-python XMPP library for asyncio";
    homepage = "https://github.com/horazont/aioxmpp";
    changelog = "https://github.com/horazont/aioxmpp/blob/${src.rev}/docs/api/changelog.rst";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}