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