1{ lib
2, buildPythonPackage
3, fetchurl
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 name = "sfepy";
21 version = "2020.4";
22 disabled = pythonOlder "3.8";
23
24 src = fetchurl {
25 url="https://github.com/sfepy/sfepy/archive/release_${version}.tar.gz";
26 sha256 = "1wb0ik6kjg3mksxin0abr88bhsly67fpg36qjdzabhj0xn7j1yaz";
27 };
28
29 propagatedBuildInputs = [
30 numpy
31 cython
32 scipy
33 matplotlib
34 pyparsing
35 tables
36 sympy
37 meshio
38 mpi4py
39 psutil
40 openssh
41 ];
42
43 postPatch = ''
44 # broken tests
45 rm tests/test_meshio.py
46
47 # slow tests
48 rm tests/test_input_*.py
49 rm tests/test_elasticity_small_strain.py
50 rm tests/test_term_call_modes.py
51 rm tests/test_refine_hanging.py
52 rm tests/test_hyperelastic_tlul.py
53 rm tests/test_poly_spaces.py
54 rm tests/test_linear_solvers.py
55 rm tests/test_quadratures.py
56 '';
57
58 checkPhase = ''
59 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
60 export HOME=$TMPDIR
61 mv sfepy sfepy.hidden
62 mkdir -p $HOME/.matplotlib
63 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
64 ${python.interpreter} run_tests.py -o $TMPDIR/test_outputs --raise
65 '';
66
67 meta = with lib; {
68 homepage = "https://sfepy.org/";
69 description = "Simple Finite Elements in Python";
70 license = licenses.bsd3;
71 maintainers = with maintainers; [ wd15 ];
72 };
73}