1{ lib, buildPythonPackage, fetchPypi, fetchpatch, numba, numpy, pandas,
2pytestrunner, thrift, pytest, python-snappy, lz4 }:
3
4buildPythonPackage rec {
5 pname = "fastparquet";
6 version = "0.2.1";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "183wdmhnhnlsd7908n3d2g4qnb49fcipqfshghwpbdwdzjpa0day";
11 };
12
13 # Fixes for recent pandas version
14 # See https://github.com/dask/fastparquet/pull/396
15 patches = fetchpatch {
16 url = https://github.com/dask/fastparquet/commit/31fb3115598d1ab62a5c8bf7923a27c16f861529.patch;
17 sha256 = "0r1ig4rydmy4j85dgb52qbsx6knxdwn4dn9h032fg3p6xqq0zlpm";
18 };
19
20 postPatch = ''
21 # FIXME: package zstandard
22 # removing the test dependency for now
23 substituteInPlace setup.py --replace "'zstandard'," ""
24 '';
25
26 nativeBuildInputs = [ pytestrunner ];
27 propagatedBuildInputs = [ numba numpy pandas thrift ];
28 checkInputs = [ pytest python-snappy lz4 ];
29
30 # test_data/ missing in PyPI tarball
31 doCheck = false;
32
33 meta = with lib; {
34 description = "A python implementation of the parquet format";
35 homepage = https://github.com/dask/fastparquet;
36 license = with licenses; [ asl20 ];
37 maintainers = with maintainers; [ veprbl ];
38 };
39}