1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, scipy
6, matplotlib
7, pyparsing
8, tables
9, cython
10, python
11, sympy
12, meshio
13, mpi4py
14, psutil
15, openssh
16, pythonOlder
17}:
18
19buildPythonPackage rec {
20 pname = "sfepy";
21 version = "2021.2";
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "sfepy";
26 repo = "sfepy";
27 rev = "release_${version}";
28 sha256 = "sha256-zFtm4KrpqjYfxVHcMrTU4tMyHYnD9VPEvuId2lR1MHU=";
29 };
30
31 propagatedBuildInputs = [
32 numpy
33 cython
34 scipy
35 matplotlib
36 pyparsing
37 tables
38 sympy
39 meshio
40 mpi4py
41 psutil
42 openssh
43 ];
44
45 postPatch = ''
46 # broken tests
47 rm tests/test_meshio.py
48
49 # slow tests
50 rm tests/test_input_*.py
51 rm tests/test_elasticity_small_strain.py
52 rm tests/test_term_call_modes.py
53 rm tests/test_refine_hanging.py
54 rm tests/test_hyperelastic_tlul.py
55 rm tests/test_poly_spaces.py
56 rm tests/test_linear_solvers.py
57 rm tests/test_quadratures.py
58 '';
59
60 checkPhase = ''
61 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
62 export HOME=$TMPDIR
63 mv sfepy sfepy.hidden
64 mkdir -p $HOME/.matplotlib
65 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
66 ${python.interpreter} run_tests.py -o $TMPDIR/test_outputs --raise
67 '';
68
69 meta = with lib; {
70 homepage = "https://sfepy.org/";
71 description = "Simple Finite Elements in Python";
72 license = licenses.bsd3;
73 maintainers = with maintainers; [ wd15 ];
74 };
75}