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 # AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'normalize'
80 "test_convert_field_datetime_default_locale"
81 ]
82 ++ lib.optionals (pythonAtLeast "3.12") [
83 # asyncio issues
84 "test_is_abstract"
85 "Testbackground"
86 "TestCapturingXSO"
87 "Testcheck_x509"
88 "TestClient"
89 "TestIntegerType"
90 "TestStanzaStream"
91 "TestStanzaToken"
92 "TestXMLStream"
93 ];
94
95 meta = {
96 description = "Pure-python XMPP library for asyncio";
97 homepage = "https://codeberg.org/jssfr/aioxmpp";
98 changelog = "https://codeberg.org/jssfr/aioxmpp/blob/${src.rev}/docs/api/changelog.rst";
99 license = lib.licenses.lgpl3Plus;
100 maintainers = with lib.maintainers; [ dotlambda ];
101 };
102}