1{ lib
2, buildPythonPackage
3, fetchurl
4, numpy
5, scipy
6, matplotlib
7, pyparsing
8, tables
9, cython
10, python
11, sympy
12}:
13
14buildPythonPackage rec {
15 name = "sfepy_${version}";
16 version = "2019.4";
17
18 src = fetchurl {
19 url="https://github.com/sfepy/sfepy/archive/release_${version}.tar.gz";
20 sha256 = "1l9vgcw09l6bwhgfzlbn68fzpvns25r6nkd1pcp7hz5165hs6zzn";
21 };
22
23 propagatedBuildInputs = [
24 numpy
25 cython
26 scipy
27 matplotlib
28 pyparsing
29 tables
30 sympy
31 ];
32
33 postPatch = ''
34 # broken test
35 rm tests/test_homogenization_perfusion.py
36 rm tests/test_splinebox.py
37
38 # slow tests
39 rm tests/test_input_*.py
40 rm tests/test_elasticity_small_strain.py
41 rm tests/test_term_call_modes.py
42 rm tests/test_refine_hanging.py
43 rm tests/test_hyperelastic_tlul.py
44 rm tests/test_poly_spaces.py
45 rm tests/test_linear_solvers.py
46 rm tests/test_quadratures.py
47 '';
48
49 checkPhase = ''
50 export HOME=$TMPDIR
51 mv sfepy sfepy.hidden
52 mkdir -p $HOME/.matplotlib
53 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
54 ${python.interpreter} run_tests.py -o $TMPDIR/test_outputs --raise
55 '';
56
57 meta = with lib; {
58 homepage = "https://sfepy.org/";
59 description = "Simple Finite Elements in Python";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ wd15 ];
62 };
63}