2025-01-06 15:23:30 +00:00

41 lines
1.3 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.6
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-doc $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
install -Dm644 Problems.md -t "$pkgdir"/usr/share/doc/$pkgname
install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
}
sha512sums="
2fdd6f33327dd07c232403254bdbe6015ee40d7d89cc8245af8e55a018725a569b1b05ea158be58486da2ab2b6c59e0848da39e075846a756d0dd63fdedd0c41 FireflyAlgorithm-0.4.6.tar.gz
"