Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 numpy, 11 12 # tests 13 python, 14}: 15 16buildPythonPackage rec { 17 pname = "cma"; 18 version = "4.4.0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "CMA-ES"; 23 repo = "pycma"; 24 tag = "r${version}"; 25 hash = "sha256-2uCn5CZma9RLK8zaaPhiQCqnK+2dWgLNr5+Ck2cV6vI="; 26 }; 27 28 # setuptools.errors.PackageDiscoveryError: 29 # Multiple top-level packages discovered in a flat-layout: ['cma', 'notebooks']. 30 postPatch = '' 31 rm -rf notebooks 32 ''; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ numpy ]; 37 38 pythonImportsCheck = [ "cma" ]; 39 40 # At least one doctest fails, thus only limited amount of files is tested 41 checkPhase = '' 42 ${python.executable} -m cma.test \ 43 interfaces.py \ 44 purecma.py \ 45 logger.py \ 46 optimization_tools.py \ 47 transformations.py 48 ''; 49 50 meta = { 51 description = "Library for Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization"; 52 homepage = "https://github.com/CMA-ES/pycma"; 53 changelog = "https://github.com/CMA-ES/pycma/releases/tag/${src.tag}"; 54 license = lib.licenses.bsd3; 55 maintainers = [ ]; 56 }; 57}