summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/datashape/default.nix
blob: 176a3136a802d034ebd7dfdef07e79b2801b3454 (plain)
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
62
63
64
65
66
67
68
69
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,
  versioneer,

  # dependencies
  multipledispatch,
  numpy,
  python-dateutil,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "datashape";
  version = "0.5.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "blaze";
    repo = "datashape";
    tag = version;
    hash = "sha256-jkGdzDSh2JHQ/Fvft/QPmpmWUSiFWT5OLX0HKaeQFGY=";
  };

  postPatch = ''
    # Remove vendorized versioneer.py
    rm versioneer.py
  '';

  build-system = [
    setuptools
    versioneer
  ];

  dependencies = [
    multipledispatch
    numpy
    python-dateutil
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.
    "test_from_numpy_dtype_fails"
    "test_string_from_CType_classmethod"
  ];

  disabledTestPaths = [
    # numpy incompatibilities
    # https://github.com/blaze/datashape/issues/232
    "datashape/tests/test_str.py"
    "datashape/tests/test_user.py"
  ];
  meta = {
    description = "Data description language";
    homepage = "https://github.com/ContinuumIO/datashape";
    changelog = "https://github.com/blaze/datashape/releases/tag/${version}";
    license = lib.licenses.bsd2;
  };
}