depot/third_party/nixpkgs/pkgs/development/python-modules/mdp/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

67 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, future
, joblib
, numpy
, pytest
, pythonOlder
, scikit-learn
}:
buildPythonPackage rec {
pname = "mdp";
version = "3.6";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "MDP";
inherit version;
hash = "sha256-rFKmUsy67RhX/xIJhi8Dv5sG0JOxJgb7QQeH2jqmWg4=";
};
postPatch = ''
# https://github.com/mdp-toolkit/mdp-toolkit/issues/92
substituteInPlace mdp/utils/routines.py \
--replace numx.typeDict numx.sctypeDict
substituteInPlace mdp/test/test_NormalizingRecursiveExpansionNode.py \
--replace py.test"" "pytest"
substituteInPlace mdp/test/test_RecursiveExpansionNode.py \
--replace py.test"" "pytest"
'';
propagatedBuildInputs = [
future
numpy
];
nativeCheckInputs = [
joblib
pytest
scikit-learn
];
pythonImportsCheck = [
"mdp"
"bimdp"
];
checkPhase = ''
runHook preCheck
pytest --seed 7710873 mdp
pytest --seed 7710873 bimdp
runHook postCheck
'';
meta = with lib; {
description = "Library for building complex data processing software by combining widely used machine learning algorithms";
homepage = "https://mdp-toolkit.github.io/";
changelog = "https://github.com/mdp-toolkit/mdp-toolkit/blob/MDP-${version}/CHANGES";
license = licenses.bsd3;
maintainers = with maintainers; [ nico202 ];
};
}