Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / avro / default.nix
blob21246fae47433fcef524ec299a7cd15b887221d4
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , setuptools
5 , fetchPypi
6 , typing-extensions
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "avro";
12   version = "1.11.3";
13   pyproject = true;
15   disabled = pythonOlder "3.6";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-M5O7UTn5zweR0gV1bOHjmltYWGr1sVPWo7WhmWEOnRc=";
20   };
22   postPatch = lib.optionalString (!pythonOlder "3.12") ''
23     substituteInPlace avro/test/test_tether_word_count.py \
24       --replace-fail 'distutils' 'setuptools._distutils'
25   '';
27   propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
28     typing-extensions
29   ];
31   nativeBuildInputs = [
32     setuptools
33   ];
35   nativeCheckInputs = [
36     pytestCheckHook
37   ];
39   disabledTests = [
40     # Requires network access
41     "test_server_with_path"
42     # AssertionError: 'reader type: null not compatible with writer type: int'
43     "test_schema_compatibility_type_mismatch"
44   ];
46   pythonImportsCheck = [
47     "avro"
48   ];
50   meta = with lib; {
51     description = "Python serialization and RPC framework";
52     mainProgram = "avro";
53     homepage = "https://github.com/apache/avro";
54     changelog = "https://github.com/apache/avro/releases/tag/release-${version}";
55     license = licenses.asl20;
56     maintainers = with maintainers; [ zimbatm ];
57   };