summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/clifford/default.nix
blob: 576cc7e331f0762edda27ed150697dc40b7d1bc2 (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
70
71
72
73
{
  lib,
  buildPythonPackage,
  fetchPypi,
  h5py,
  ipython,
  numba,
  numpy,
  pytestCheckHook,
  setuptools,
  scipy,
  sparse,
}:

buildPythonPackage rec {
  pname = "clifford";
  version = "1.4.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-eVE8FrD0YHoRreY9CrNb8v4v4KrG83ZU0oFz+V+p+Q0=";
  };

  build-system = [ setuptools ];

  dependencies = [
    h5py
    numba
    numpy
    scipy
    sparse
  ];

  nativeCheckInputs = [
    pytestCheckHook
    ipython
  ];

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

  disabledTests = [
    "veryslow"
    "test_algebra_initialisation"
    "test_cga"
    "test_grade_projection"
    "test_multiple_grade_projection"
    "test_inverse"
    "test_inv_g4"
  ];

  disabledTestPaths = [
    # Disable failing tests
    "test_g3c_tools.py"
    "test_multivector_inverse.py"
  ];

  pythonImportsCheck = [ "clifford" ];

  meta = {
    description = "Numerical Geometric Algebra Module";
    homepage = "https://clifford.readthedocs.io";
    changelog = "https://github.com/pygae/clifford/releases/tag/v${version}";
    license = lib.licenses.bsd3;
    maintainers = [ ];
    # Broken with numba >= 0.54
    # see https://github.com/pygae/clifford/issues/430
    broken = lib.versionAtLeast numba.version "0.58";
  };
}