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