Files
nixpkgs/pkgs/development/python-modules/fastavro/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

77 lines
1.6 KiB
Nix

{
buildPythonPackage,
cython,
fetchFromGitHub,
isPy38,
lib,
lz4,
numpy,
pandas,
pytestCheckHook,
python-dateutil,
cramjam,
setuptools,
zlib-ng,
zstandard,
}:
buildPythonPackage rec {
pname = "fastavro";
version = "1.12.1";
pyproject = true;
src = fetchFromGitHub {
owner = "fastavro";
repo = "fastavro";
tag = version;
hash = "sha256-r/zaQ44ZPuSR1HxaqxD26kZPWREhmKP+oTOSa5QCEU4=";
};
preBuild = ''
export FASTAVRO_USE_CYTHON=1
'';
build-system = [
cython
setuptools
];
optional-dependencies = {
codecs = [
cramjam
lz4
zstandard
];
snappy = [ cramjam ];
zstandard = [ zstandard ];
lz4 = [ lz4 ];
};
nativeCheckInputs = [
numpy
pandas
pytestCheckHook
python-dateutil
zlib-ng
]
++ lib.concatAttrValues 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.
disabledTests = [ "test_cython_python" ];
# CLI tests are broken on Python 3.8. See https://github.com/fastavro/fastavro/issues/558.
disabledTestPaths = lib.optionals isPy38 [ "tests/test_main_cli.py" ];
pythonImportsCheck = [ "fastavro" ];
meta = {
description = "Fast read/write of AVRO files";
mainProgram = "fastavro";
homepage = "https://github.com/fastavro/fastavro";
changelog = "https://github.com/fastavro/fastavro/blob/${src.tag}/ChangeLog";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ samuela ];
};
}