Package Details: python-cmaes 0.12.0-1

Git Clone URL: https://aur.archlinux.org/python-cmaes.git (read-only, click to copy)
Package Base: python-cmaes
Description: Lightweight Covariance Matrix Adaptation Evolution Strategy (CMA-ES) implementation for Python 3
Upstream URL: https://github.com/CyberAgent/cmaes
Licenses: MIT
Submitter: benallard
Maintainer: benallard
Last Packager: benallard
Votes: 1
Popularity: 0.000040
First Submitted: 2021-03-18 21:24 (UTC)
Last Updated: 2026-01-24 13:16 (UTC)

Latest Comments

benallard commented on 2026-01-24 13:16 (UTC)

Thanks for the patch !

iyanmv commented on 2026-01-12 14:40 (UTC)

Here is the patch for the modified PKGBUILD I used:

  • Use the PEP 517 standard workflow to build and generate the package
  • Add check()
  • Add python-scipy as optional dependency

Feel free to use any of the suggestions.

diff --git a/PKGBUILD b/PKGBUILD
index e605917..b82315b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,43 @@
 # Maintainer: Benoît Allard <benoit.allard@gnx.de>
 pkgname=python-cmaes
-pkgver=0.10.0
+pkgver=0.12.0
 pkgrel=1
 pkgdesc="Lightweight Covariance Matrix Adaptation Evolution Strategy (CMA-ES) implementation for Python 3"
 arch=('any')
 url="https://github.com/CyberAgent/cmaes"
 license=('MIT')
 depends=("python" "python-numpy")
-makedepends=("python-wheel")
+optdepends=(
+    "python-scipy: support for CMA-ES with Margin (CMAwM)"
+)
+makedepends=(
+    python-build
+    python-installer
+    python-setuptools
+)
+checkdepends=(
+    python-hypothesis
+    python-pytest
+)
 _name=${pkgname#python-}
 source=("$pkgname-$pkgver.tar.gz::https://github.com/CyberAgent/$_name/archive/v$pkgver.tar.gz")
-sha256sums=('d6a5b8e7a25390ba1f83d6426a1f79d9ba3d46d3d82f79e0fb945668f51af1b1')
+sha256sums=('61c0b7ae06e4a92c3759765418ea30aaf51511f440377c3bbc81bd75f7c7e89f')

 build() {
     cd $_name-$pkgver
-    export PYTHONSEED=1
-    python setup.py build
+    python -m build --wheel --no-isolation
+}
+
+check() {
+    cd $_name-$pkgver
+    python -m venv --system-site-packages test-env
+    test-env/bin/python -m installer dist/*.whl
+    rm -rf cmaes
+    test-env/bin/python -P -m pytest -o addopts=""
 }

 package() {
     cd $_name-$pkgver
-    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+    python -m installer --destdir="$pkgdir" dist/*.whl
+    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }

iyanmv commented on 2026-01-12 14:26 (UTC)

This fails to build due to missing dependencies in makedepends.