1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 h5py,
7 ipython,
8 numba,
9 numpy,
10 pytestCheckHook,
11 setuptools,
12 scipy,
13 sparse,
14}:
15
16buildPythonPackage rec {
17 pname = "clifford";
18 version = "1.4.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.5";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-eVE8FrD0YHoRreY9CrNb8v4v4KrG83ZU0oFz+V+p+Q0=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 h5py
32 numba
33 numpy
34 scipy
35 sparse
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ipython
41 ];
42
43 # avoid collecting local files
44 preCheck = ''
45 cd clifford/test
46 '';
47
48 disabledTests = [
49 "veryslow"
50 "test_algebra_initialisation"
51 "test_cga"
52 "test_grade_projection"
53 "test_multiple_grade_projection"
54 "test_inverse"
55 "test_inv_g4"
56 ];
57
58 disabledTestPaths = [
59 # Disable failing tests
60 "test_g3c_tools.py"
61 "test_multivector_inverse.py"
62 ];
63
64 pythonImportsCheck = [ "clifford" ];
65
66 meta = with lib; {
67 description = "Numerical Geometric Algebra Module";
68 homepage = "https://clifford.readthedocs.io";
69 changelog = "https://github.com/pygae/clifford/releases/tag/v${version}";
70 license = licenses.bsd3;
71 maintainers = [ ];
72 # Broken with numba >= 0.54
73 # see https://github.com/pygae/clifford/issues/430
74 broken = versionAtLeast numba.version "0.58";
75 };
76}