1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, python 5, numba 6, numpy 7, pandas 8, cramjam 9, fsspec 10, thrift 11, pytestCheckHook 12}: 13 14buildPythonPackage rec { 15 pname = "fastparquet"; 16 version = "0.7.1"; 17 18 src = fetchFromGitHub { 19 owner = "dask"; 20 repo = pname; 21 rev = version; 22 hash = "sha256-xV0AXNZSy4LSrHf11OP/+KDbeDQu8yF1ugX+W4mie1E="; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "'pytest-runner'," "" \ 28 --replace "oldest-supported-numpy" "numpy" 29 ''; 30 31 propagatedBuildInputs = [ cramjam fsspec numba numpy pandas thrift ]; 32 checkInputs = [ pytestCheckHook ]; 33 34 # Workaround https://github.com/NixOS/nixpkgs/issues/123561 35 preCheck = '' 36 mv fastparquet/test . 37 rm -r fastparquet 38 fastparquet_test="$out"/${python.sitePackages}/fastparquet/test 39 ln -s `pwd`/test "$fastparquet_test" 40 ''; 41 42 postCheck = '' 43 rm "$fastparquet_test" 44 ''; 45 46 pythonImportsCheck = [ "fastparquet" ]; 47 48 meta = with lib; { 49 description = "A python implementation of the parquet format"; 50 homepage = "https://github.com/dask/fastparquet"; 51 license = with licenses; [ asl20 ]; 52 maintainers = with maintainers; [ veprbl ]; 53 }; 54}