2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cma";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.0.0";
|
|
|
|
pyproject = true;
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CMA-ES";
|
|
|
|
repo = "pycma";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/r${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-W4KDtX/Ho/XUrZr2cmS66Q0q90FEHRJN0VF4sMgonRw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ numpy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2022-11-02 22:02:43 +00:00
|
|
|
# At least one doctest fails, thus only limited amount of files is tested
|
|
|
|
${python.executable} -m cma.test interfaces.py purecma.py logger.py optimization_tools.py transformations.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cma" ];
|
2022-11-02 22:02:43 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-11-02 22:02:43 +00:00
|
|
|
description = "Library for Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/CMA-ES/pycma";
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://github.com/CMA-ES/pycma/releases/tag/r${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|