1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 python,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "cma";
13 version = "4.3.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "CMA-ES";
20 repo = "pycma";
21 tag = "r${version}";
22 hash = "sha256-2uCn5CZma9RLK8zaaPhiQCqnK+2dWgLNr5+Ck2cV6vI=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [ numpy ];
28
29 checkPhase = ''
30 # At least one doctest fails, thus only limited amount of files is tested
31 ${python.executable} -m cma.test interfaces.py purecma.py logger.py optimization_tools.py transformations.py
32 '';
33
34 pythonImportsCheck = [ "cma" ];
35
36 meta = with lib; {
37 description = "Library for Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization";
38 homepage = "https://github.com/CMA-ES/pycma";
39 changelog = "https://github.com/CMA-ES/pycma/releases/tag/r${src.tag}";
40 license = licenses.bsd3;
41 maintainers = [ ];
42 };
43}