at 23.05-pre 954 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, numpy 5, python 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "cma"; 11 version = "3.2.2"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "CMA-ES"; 18 repo = "pycma"; 19 rev = "refs/tags/r${version}"; 20 hash = "sha256-STF7jtLqI2KiWvvI9/reRjP1XyW8l4/qy9uAPpE9mTs="; 21 }; 22 23 propagatedBuildInputs = [ 24 numpy 25 ]; 26 27 checkPhase = '' 28 # At least one doctest fails, thus only limited amount of files is tested 29 ${python.executable} -m cma.test interfaces.py purecma.py logger.py optimization_tools.py transformations.py 30 ''; 31 32 pythonImportsCheck = [ 33 "cma" 34 ]; 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 license = licenses.bsd3; 40 maintainers = with maintainers; [ costrouc ]; 41 }; 42}