1{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder
2, pytestCheckHook, nose, glibcLocales, fetchpatch
3, numpy, scipy, matplotlib, h5py }:
4
5buildPythonPackage rec {
6 pname = "bayespy";
7 version = "0.5.22";
8
9 # Python 2 not supported and not some old Python 3 because MPL doesn't support
10 # them properly.
11 disabled = pythonOlder "3.4";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "ed0057dc22bd392df4b3bba23536117e1b2866e3201b12c5a37428d23421a5ba";
16 };
17
18 patches = [
19 # Change from scipy to locally defined epsilon
20 # https://github.com/bayespy/bayespy/pull/126
21 (fetchpatch {
22 name = "locally-defined-epsilon.patch";
23 url = "https://github.com/bayespy/bayespy/commit/9be53bada763e19c2b6086731a6aa542ad33aad0.patch";
24 sha256 = "sha256-KYt/0GcaNWR9K9/uS2OXgK7g1Z+Bayx9+IQGU75Mpuo=";
25 })
26 ];
27
28 checkInputs = [ pytestCheckHook nose glibcLocales ];
29
30 propagatedBuildInputs = [ numpy scipy matplotlib h5py ];
31
32 disabledTests = [
33 # Assertion error
34 "test_message_to_parents"
35 ];
36
37 pythonImportsCheck = [ "bayespy" ];
38
39 meta = with lib; {
40 homepage = "http://www.bayespy.org";
41 description = "Variational Bayesian inference tools for Python";
42 license = licenses.mit;
43 maintainers = with maintainers; [ jluttine ];
44 };
45}