about summary refs log tree commit diff
path: root/pkgs/development/python-modules/parquet/default.nix
blob: 92e5e776479400da3e0d636f739b7d3605fd68e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  pytestCheckHook,
  python-snappy,
  pythonOlder,
  setuptools,
  thriftpy2,
}:

buildPythonPackage rec {
  pname = "parquet";
  version = "1.3.1";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "jcrobak";
    repo = "parquet-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-WVDffYKGsyepK4w1d4KUUMmxB6a6ylTbJvG79Bt5G6o=";
  };

  patches = [
    # Refactor deprecated unittest aliases, https://github.com/jcrobak/parquet-python/pull/83
    (fetchpatch {
      name = "unittest-aliases.patch";
      url = "https://github.com/jcrobak/parquet-python/commit/746bebd1e84d8945a3491e1ae5e44102ff534592.patch";
      hash = "sha256-4awxlzman/YMfOz1WYNR+mVn1ixGku9sqlaMJ1QITYs=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    python-snappy
    thriftpy2
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # Fails with AttributeError
    "test_bson"
    "testFromExample"
  ];

  pythonImportsCheck = [ "thriftpy2" ];

  meta = with lib; {
    description = "Python implementation of the parquet columnar file format";
    homepage = "https://github.com/jcrobak/parquet-python";
    changelog = "https://github.com/jcrobak/parquet-python/releases/tag/v${version}";
    license = licenses.bsd2;
    maintainers = with maintainers; [ fab ];
    mainProgram = "parquet";
  };
}