Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.fastavro: init at 1.4.4 #137685

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions pkgs/development/python-modules/fastavro/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ buildPythonPackage
, cython
, fetchFromGitHub
, isPy38
, lib
, lz4
, numpy
, pandas
, pytestCheckHook
, python-dateutil
, python-snappy
, pythonOlder
, zstandard
}:

buildPythonPackage rec {
pname = "fastavro";
version = "1.4.4";

samuela marked this conversation as resolved.
Show resolved Hide resolved
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "1sf8nqifwp0cggk59s22ygj3rm1nysa8b91xl8bpv2knqyjy1q32";
};

preBuild = ''
export FASTAVRO_USE_CYTHON=1
'';

nativeBuildInputs = [ cython ];

checkInputs = [
lz4
numpy
pandas
pytestCheckHook
python-dateutil
python-snappy
zstandard
];

# 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 = with lib; {
description = "Fast read/write of AVRO files";
homepage = "https://github.com/fastavro/fastavro";
license = licenses.mit;
maintainers = with maintainers; [ samuela ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,8 @@ in {

fastapi = callPackage ../development/python-modules/fastapi { };

fastavro = callPackage ../development/python-modules/fastavro { };

fastcache = callPackage ../development/python-modules/fastcache { };

fastdiff = callPackage ../development/python-modules/fastdiff { };
Expand Down