2023-11-10 18:02:04 +00:00

38 lines
1.1 KiB
Plaintext

# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-fireflyalgorithm
_pkgorig=FireflyAlgorithm
pkgver=0.4.1
pkgrel=0
pkgdesc="An implementation of the stochastic nature-inspired algorithm for optimization"
url="https://github.com/firefly-cpp/FireflyAlgorithm"
arch="noarch"
license="MIT"
depends="python3 py3-numpy"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/firefly-cpp/FireflyAlgorithm/archive/$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/FireflyAlgorithm-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -n auto
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/fireflyalgorithm-$pkgver-py3-none-any.whl
}
sha512sums="
07727edddd6a60f79862a48b2f1b781e9b78bfa6610847055865cd09a42ff0ee1ef04b0d6801cc0de1063c01bcd646c8d7ccbbc256e9c71b3a2123e161f1330e FireflyAlgorithm-0.4.1.tar.gz
"