2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
fetchPypi,
|
|
|
|
typing-extensions,
|
|
|
|
pytestCheckHook,
|
2021-12-26 17:43:05 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "avro";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.11.3";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# distutils usage: https://github.com/search?q=repo%3Aapache%2Favro%20distutils&type=code
|
2021-12-26 17:43:05 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-M5O7UTn5zweR0gV1bOHjmltYWGr1sVPWo7WhmWEOnRc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = lib.optionalString (!pythonOlder "3.12") ''
|
|
|
|
substituteInPlace avro/test/test_tether_word_count.py \
|
|
|
|
--replace-fail 'distutils' 'setuptools._distutils'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Requires network access
|
|
|
|
"test_server_with_path"
|
2023-07-15 17:15:38 +00:00
|
|
|
# AssertionError: 'reader type: null not compatible with writer type: int'
|
|
|
|
"test_schema_compatibility_type_mismatch"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "avro" ];
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-12-26 17:43:05 +00:00
|
|
|
description = "Python serialization and RPC framework";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "avro";
|
2021-12-26 17:43:05 +00:00
|
|
|
homepage = "https://github.com/apache/avro";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/apache/avro/releases/tag/release-${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|