1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 pytestCheckHook,
7 python-snappy,
8 pythonOlder,
9 setuptools,
10 thriftpy2,
11}:
12
13buildPythonPackage rec {
14 pname = "parquet";
15 version = "1.3.1";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "jcrobak";
22 repo = "parquet-python";
23 tag = "v${version}";
24 hash = "sha256-WVDffYKGsyepK4w1d4KUUMmxB6a6ylTbJvG79Bt5G6o=";
25 };
26
27 patches = [
28 # Refactor deprecated unittest aliases, https://github.com/jcrobak/parquet-python/pull/83
29 (fetchpatch {
30 name = "unittest-aliases.patch";
31 url = "https://github.com/jcrobak/parquet-python/commit/746bebd1e84d8945a3491e1ae5e44102ff534592.patch";
32 hash = "sha256-4awxlzman/YMfOz1WYNR+mVn1ixGku9sqlaMJ1QITYs=";
33 })
34 ];
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 python-snappy
40 thriftpy2
41 ];
42
43 nativeCheckInputs = [ pytestCheckHook ];
44
45 disabledTests = [
46 # Fails with AttributeError
47 "test_bson"
48 "testFromExample"
49 ];
50
51 pythonImportsCheck = [ "thriftpy2" ];
52
53 meta = with lib; {
54 description = "Python implementation of the parquet columnar file format";
55 homepage = "https://github.com/jcrobak/parquet-python";
56 changelog = "https://github.com/jcrobak/parquet-python/releases/tag/v${version}";
57 license = licenses.bsd2;
58 maintainers = with maintainers; [ fab ];
59 mainProgram = "parquet";
60 };
61}