1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, fetchurl
6, cython
7, enum34
8, gfortran
9, isPy3k
10, numpy
11, pytest
12, python
13, scipy
14, sundials_3
15}:
16
17buildPythonPackage rec {
18 pname = "scikits.odes";
19 version = "2.4.0-9-g93075ae";
20
21 # we fetch github instead of Pypi, as we want #104 and #105, which don't apply cleanly on 2.4.0
22 src = fetchFromGitHub {
23 owner = "bmcage";
24 repo = "odes";
25 rev = "93075ae25c409f572f13ca7207fada5706f73c73";
26 sha256 = "161rab7hy6r1a9xw1zby9xhnnmxi0zwdpzxfpjkw9651xn2k5xyw";
27 };
28
29 nativeBuildInputs = [
30 gfortran
31 cython
32 ];
33
34 propagatedBuildInputs = [
35 numpy
36 sundials_3
37 scipy
38 ] ++ lib.optionals (!isPy3k) [ enum34 ];
39
40 doCheck = true;
41 checkInputs = [ pytest ];
42
43 checkPhase = ''
44 cd $out/${python.sitePackages}/scikits/odes/tests
45 pytest
46 '';
47
48 meta = with stdenv.lib; {
49 description = "A scikit offering extra ode/dae solvers, as an extension to what is available in scipy";
50 homepage = https://github.com/bmcage/odes;
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ flokli idontgetoutmuch ];
53 platforms = [ "aarch64-linux" "x86_64-linux" "x86_64-darwin" ];
54 };
55}