about summary refs log tree commit diff
path: root/pkgs/development/python-modules/fipy/default.nix
blob: d8f7c808a9aff0fb4b9b98712dd96665ddb77764 (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
{ lib
, buildPythonPackage
, numpy
, scipy
, pyamg
, future
, matplotlib
, tkinter
, mpi4py
, scikit-fmm
, gmsh
, python
, stdenv
, openssh
, fetchFromGitHub
, pythonOlder
}:

buildPythonPackage rec {
  pname = "fipy";
  version = "3.4.4";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "usnistgov";
    repo = "fipy";
    rev = "refs/tags/${version}";
    hash = "sha256-XZpm+gzysR2OXBcxWUEjP1PlaLuOL2NpmeKMCH+OEb4=";
  };

  propagatedBuildInputs = [
    numpy
    scipy
    pyamg
    matplotlib
    tkinter
    mpi4py
    future
    scikit-fmm
    openssh
  ] ++ lib.optionals (!stdenv.isDarwin) [
    gmsh
  ];

  nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [
    gmsh
  ];

  checkPhase = ''
    export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
    ${python.interpreter} setup.py test --modules
  '';

  pythonImportsCheck = [
    "fipy"
  ];

  meta = with lib; {
    homepage = "https://www.ctcms.nist.gov/fipy/";
    description = "A Finite Volume PDE Solver Using Python";
    changelog = "https://github.com/usnistgov/fipy/blob/${version}/CHANGELOG.rst";
    license = licenses.free;
    maintainers = with maintainers; [ wd15 ];
  };
}