1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 setuptools,
6 fetchPypi,
7 typing-extensions,
8 pytest7CheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "avro";
13 version = "1.12.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-ytnFOyPO7Wmceva93O1C4sVy/WtAjCV6fU/E6M8uLWs=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = lib.optionals (pythonOlder "3.8") [ typing-extensions ];
26
27 nativeCheckInputs = [ pytest7CheckHook ];
28
29 disabledTests = [
30 # Requires network access
31 "test_server_with_path"
32 # AssertionError: 'reader type: null not compatible with writer type: int'
33 "test_schema_compatibility_type_mismatch"
34 ];
35
36 pythonImportsCheck = [ "avro" ];
37
38 meta = with lib; {
39 description = "Python serialization and RPC framework";
40 homepage = "https://github.com/apache/avro";
41 changelog = "https://github.com/apache/avro/releases/tag/release-${version}";
42 license = licenses.asl20;
43 maintainers = with maintainers; [ zimbatm ];
44 mainProgram = "avro";
45 };
46}