about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/clifford/default.nix
blob: 85ed160413e7901d0a5dc6792c013d4a7007bd10 (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
62
63
64
65
66
67
68
69
70
71
72
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy27
, future
, h5py
, ipython
, numba
, numpy
, pytestCheckHook
, scipy
, sparse
}:

buildPythonPackage rec {
  pname = "clifford";
  version = "1.3.1";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    sha256 = "ade11b20d0631dfc9c2f18ce0149f1e61e4baf114108b27cfd68e5c1619ecc0c";
  };

  patches = [
    (fetchpatch {
      # Compatibility with h5py 3.
      # Will be included in the next releasse after 1.3.1
      url = "https://github.com/pygae/clifford/pull/388/commits/955d141662c68d3d61aa50a162b39e656684c208.patch";
      sha256 = "0pkpwnk0kfdxsbzsxqlqh8kgif17l5has0mg31g3kyp8lncj89b1";
    })
  ];

  propagatedBuildInputs = [
    future
    h5py
    numba
    numpy
    scipy
    sparse
  ];

  checkInputs = [
    pytestCheckHook
    ipython
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'numba==0.43'" "'numba'"
  '';

  # avoid collecting local files
  preCheck = ''
    cd clifford/test
  '';

  disabledTests = [
    "veryslow"
    "test_algebra_initialisation"
    "test_cga"
    "test_estimate_rotor_sequential[random_sphere]"
  ];

  meta = with lib; {
    description = "Numerical Geometric Algebra Module";
    homepage = "https://clifford.readthedocs.io";
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}