1{
2 lib,
3 aioopenssl,
4 aiosasl,
5 babel,
6 buildPythonPackage,
7 dnspython,
8 fetchFromGitea,
9 lxml,
10 multidict,
11 pyasn1-modules,
12 pyasn1,
13 pyopenssl,
14 pytestCheckHook,
15 pythonAtLeast,
16 pythonOlder,
17 pytz,
18 setuptools,
19 sortedcollections,
20 tzlocal,
21}:
22
23buildPythonPackage rec {
24 pname = "aioxmpp";
25 version = "0.13.3";
26 pyproject = true;
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitea {
31 domain = "codeberg.org";
32 owner = "jssfr";
33 repo = "aioxmpp";
34 tag = "v${version}";
35 hash = "sha256-bQPKEM5eKhFI3Kx3U1espdxqjnG4yUgOXmYCrd98PDo=";
36 };
37
38 postPatch = ''
39 substituteInPlace tests/bookmarks/test_service.py \
40 --replace-fail 'can only assign an iterable$' 'must assign iterable'
41 substituteInPlace tests/test_utils.py \
42 --replace-fail 'property of .* has no' 'property .*of .* has no'
43 '';
44
45 pythonRelaxDeps = [
46 "lxml"
47 ];
48
49 build-system = [ setuptools ];
50
51 dependencies = [
52 aiosasl
53 aioopenssl
54 babel
55 dnspython
56 lxml
57 multidict
58 pyasn1
59 pyasn1-modules
60 pyopenssl
61 pytz
62 sortedcollections
63 tzlocal
64 ];
65
66 pythonImportsCheck = [
67 "aioxmpp"
68 "aioxmpp.node"
69 "aioxmpp.security_layer"
70 "aioxmpp.stanza"
71 "aioxmpp.stream"
72 ];
73
74 nativeCheckInputs = [ pytestCheckHook ];
75
76 disabledTestPaths = [ "benchmarks" ];
77
78 disabledTests =
79 [
80 # AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'normalize'
81 "test_convert_field_datetime_default_locale"
82 ]
83 ++ lib.optionals (pythonAtLeast "3.12") [
84 # asyncio issues
85 "test_is_abstract"
86 "Testbackground"
87 "TestCapturingXSO"
88 "Testcheck_x509"
89 "TestClient"
90 "TestIntegerType"
91 "TestStanzaStream"
92 "TestStanzaToken"
93 "TestXMLStream"
94 ];
95
96 meta = {
97 description = "Pure-python XMPP library for asyncio";
98 homepage = "https://codeberg.org/jssfr/aioxmpp";
99 changelog = "https://codeberg.org/jssfr/aioxmpp/blob/${src.rev}/docs/api/changelog.rst";
100 license = lib.licenses.lgpl3Plus;
101 maintainers = with lib.maintainers; [ dotlambda ];
102 };
103}