python310Packages.fastavro: add optional-dependencies

This commit is contained in:
Fabian Affolter 2023-05-27 21:07:39 +02:00
parent ee060756f7
commit eba43ed017

View File

@ -15,10 +15,11 @@
buildPythonPackage rec {
pname = "fastavro";
version = "1.7.4";
version = "1.7.2";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = pname;
@ -32,15 +33,29 @@ buildPythonPackage rec {
nativeBuildInputs = [ cython ];
passthru.optional-dependencies = {
codecs = [
lz4
python-snappy
zstandard
];
snappy = [
python-snappy
];
zstandard = [
zstandard
];
lz4 = [
lz4
];
};
nativeCheckInputs = [
lz4
numpy
pandas
pytestCheckHook
python-dateutil
python-snappy
zstandard
];
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
# Fails with "AttributeError: module 'fastavro._read_py' has no attribute
# 'CYTHON_MODULE'." Doesn't appear to be serious. See https://github.com/fastavro/fastavro/issues/112#issuecomment-387638676.