1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6, hypothesis
7, numpy
8, setuptools
9}:
10
11buildPythonPackage rec {
12 pname = "cmaes";
13 version = "0.10.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "CyberAgentAILab";
20 repo = "cmaes";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-1mXulG/yqNwKQKDFGBh8uxIYOPSsm8+PNp++CSswc50=";
23 };
24
25 nativeBuildInputs = [
26 setuptools
27 ];
28
29 propagatedBuildInputs = [
30 numpy
31 ];
32
33 nativeCheckInputs = [
34 hypothesis
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "cmaes"
40 ];
41
42 disabledTests = [
43 # Disable time-sensitive test
44 "test_cma_tell"
45 ];
46
47 meta = with lib; {
48 description = "Python library for CMA evolution strategy";
49 homepage = "https://github.com/CyberAgentAILab/cmaes";
50 changelog = "https://github.com/CyberAgentAILab/cmaes/releases/tag/v${version}";
51 license = licenses.mit;
52 maintainers = with maintainers; [ bcdarwin ];
53 };
54}