1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 future,
6 joblib,
7 numpy,
8 pytest,
9 pythonOlder,
10 scikit-learn,
11}:
12
13buildPythonPackage rec {
14 pname = "mdp";
15 version = "3.6";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 pname = "MDP";
22 inherit version;
23 hash = "sha256-rFKmUsy67RhX/xIJhi8Dv5sG0JOxJgb7QQeH2jqmWg4=";
24 };
25
26 postPatch = ''
27 # https://github.com/mdp-toolkit/mdp-toolkit/issues/92
28 substituteInPlace mdp/utils/routines.py \
29 --replace numx.typeDict numx.sctypeDict
30 substituteInPlace mdp/test/test_NormalizingRecursiveExpansionNode.py \
31 --replace py.test"" "pytest"
32 substituteInPlace mdp/test/test_RecursiveExpansionNode.py \
33 --replace py.test"" "pytest"
34 '';
35
36 propagatedBuildInputs = [
37 future
38 numpy
39 ];
40
41 nativeCheckInputs = [
42 joblib
43 pytest
44 scikit-learn
45 ];
46
47 pythonImportsCheck = [
48 "mdp"
49 "bimdp"
50 ];
51
52 checkPhase = ''
53 runHook preCheck
54
55 pytest --seed 7710873 mdp
56 pytest --seed 7710873 bimdp
57
58 runHook postCheck
59 '';
60
61 meta = with lib; {
62 description = "Library for building complex data processing software by combining widely used machine learning algorithms";
63 homepage = "https://mdp-toolkit.github.io/";
64 changelog = "https://github.com/mdp-toolkit/mdp-toolkit/blob/MDP-${version}/CHANGES";
65 license = licenses.bsd3;
66 maintainers = with maintainers; [ nico202 ];
67 };
68}