aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-fireflyalgorithm/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-fireflyalgorithm/APKBUILD')
-rw-r--r--community/py3-fireflyalgorithm/APKBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/community/py3-fireflyalgorithm/APKBUILD b/community/py3-fireflyalgorithm/APKBUILD
new file mode 100644
index 00000000000..3da92d59a72
--- /dev/null
+++ b/community/py3-fireflyalgorithm/APKBUILD
@@ -0,0 +1,40 @@
+# 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.4
+pkgrel=1
+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="
+f0060bcfabb3cff94bc64ac32bda64bc8fc002187375488d1b3c33d3b103cd6da712c8abfe291510fb3a433b8a087a9bee3ea0d6b1297ee5583c2a90a5b1a904 FireflyAlgorithm-0.4.4.tar.gz
+"