blob: 4b1f85e7d20375235ebf2f26fe2b595e4bc700f8 (
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
|
{ lib
, buildPythonPackage
, pythonOlder
, setuptools
, fetchPypi
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "avro";
version = "1.11.3";
pyproject = true;
# distutils usage: https://github.com/search?q=repo%3Aapache%2Favro%20distutils&type=code
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-M5O7UTn5zweR0gV1bOHjmltYWGr1sVPWo7WhmWEOnRc=";
};
postPatch = lib.optionalString (!pythonOlder "3.12") ''
substituteInPlace avro/test/test_tether_word_count.py \
--replace-fail 'distutils' 'setuptools._distutils'
'';
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
typing-extensions
];
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = [
# Requires network access
"test_server_with_path"
# AssertionError: 'reader type: null not compatible with writer type: int'
"test_schema_compatibility_type_mismatch"
];
pythonImportsCheck = [
"avro"
];
meta = with lib; {
description = "Python serialization and RPC framework";
mainProgram = "avro";
homepage = "https://github.com/apache/avro";
changelog = "https://github.com/apache/avro/releases/tag/release-${version}";
license = licenses.asl20;
maintainers = with maintainers; [ zimbatm ];
};
}
|