Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
numpy,
|
|
|
|
# tests
|
|
python,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cma";
|
|
version = "4.4.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "CMA-ES";
|
|
repo = "pycma";
|
|
tag = "r${version}";
|
|
hash = "sha256-2uCn5CZma9RLK8zaaPhiQCqnK+2dWgLNr5+Ck2cV6vI=";
|
|
};
|
|
|
|
# setuptools.errors.PackageDiscoveryError:
|
|
# Multiple top-level packages discovered in a flat-layout: ['cma', 'notebooks'].
|
|
postPatch = ''
|
|
rm -rf notebooks
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ numpy ];
|
|
|
|
pythonImportsCheck = [ "cma" ];
|
|
|
|
# At least one doctest fails, thus only limited amount of files is tested
|
|
checkPhase = ''
|
|
${python.executable} -m cma.test \
|
|
interfaces.py \
|
|
purecma.py \
|
|
logger.py \
|
|
optimization_tools.py \
|
|
transformations.py
|
|
'';
|
|
|
|
meta = {
|
|
description = "Library for Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization";
|
|
homepage = "https://github.com/CMA-ES/pycma";
|
|
changelog = "https://github.com/CMA-ES/pycma/releases/tag/${src.tag}";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|