1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 numpy,
7 pythonOlder,
8 pytestCheckHook,
9 setuptools,
10 setuptools-scm,
11 scipy,
12}:
13
14buildPythonPackage rec {
15 pname = "dmsuite";
16 version = "0.3.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-IqLsHkGNgPz2yZm0QMyMMo6Mr2RsU2DPGxYpoNwC3fs=";
24 };
25
26 build-system = [
27 setuptools
28 setuptools-scm
29 ];
30
31 dependencies = [
32 numpy
33 scipy
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 # Slight precision error probably due to different BLAS backend on Darwin
41 disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
42 "test_cheb_scaled"
43 ];
44
45 pythonImportsCheck = [ "dmsuite" ];
46
47 meta = {
48 description = "Scientific library providing a collection of spectral collocation differentiation matrices";
49 homepage = "https://github.com/labrosse/dmsuite";
50 changelog = "https://github.com/labrosse/dmsuite/releases/tag/v${version}";
51 license = lib.licenses.gpl2Only;
52 maintainers = with lib.maintainers; [ loicreynier ];
53 };
54}