-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137685 from samuela/samuela/fastavro
python3Packages.fastavro: init at 1.4.4
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
||
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters