summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Giniewicz2018-05-08 13:27:18 +0200
committerAndrzej Giniewicz2018-05-08 13:27:18 +0200
commit0ca03d7a826795206ee8ff89c3117702c59994c5 (patch)
tree6db82ecc6d7a2b458a2b55834dcf7b94b6847d8e
downloadaur-python-niapy.tar.gz
python-niapy: new package for nature inspired algorithms
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD54
2 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a218c405032
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = python-niapy
+ pkgdesc = Python microframework for building nature-inspired algorithms
+ pkgver = 1.0.1
+ pkgrel = 1
+ url = https://github.com/NiaOrg/NiaPy
+ arch = any
+ license = MIT
+ makedepends = python2-setuptools
+ makedepends = python-setuptools
+ makedepends = python-scipy
+ makedepends = python2-scipy
+ makedepends = python-click
+ makedepends = python2-click
+ makedepends = python-xlsxwriter
+ makedepends = python2-xlsxwriter
+ source = python-niapy-1.0.1.tar.gz::https://github.com/NiaOrg/NiaPy/archive/1.0.1.tar.gz
+ md5sums = 7bbf957f02bafd880d6de23e1ec7e557
+
+pkgname = python2-niapy
+ depends = python2-scipy
+ depends = python2-click
+ depends = python2-xlsxwriter
+
+pkgname = python-niapy
+ depends = python-scipy
+ depends = python-click
+ depends = python-xlsxwriter
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..98f7ba80cfc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
+
+pkgbase=python-niapy
+pkgname=('python2-niapy' 'python-niapy')
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="Python microframework for building nature-inspired algorithms"
+url="https://github.com/NiaOrg/NiaPy"
+arch=('any')
+license=('MIT')
+makedepends=('python2-setuptools' 'python-setuptools' 'python-scipy' 'python2-scipy' 'python-click' 'python2-click' 'python-xlsxwriter' 'python2-xlsxwriter')
+source=($pkgbase-$pkgver.tar.gz::https://github.com/NiaOrg/NiaPy/archive/$pkgver.tar.gz)
+md5sums=('7bbf957f02bafd880d6de23e1ec7e557')
+
+prepare() {
+ cd "$srcdir"
+ cp -a NiaPy-$pkgver NiaPy-py2-$pkgver
+ cd NiaPy-py2-$pkgver
+
+ sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+ -i $(find . -name '*.py')
+}
+
+build() {
+ msg "Building Python2"
+ cd "$srcdir"/NiaPy-py2-$pkgver
+ python2 setup.py build
+
+ msg "Building Python3"
+ cd "$srcdir"/NiaPy-$pkgver
+ python setup.py build
+}
+
+package_python2-niapy() {
+ depends=('python2-scipy' 'python2-click' 'python2-xlsxwriter')
+
+ cd "$srcdir"/NiaPy-py2-$pkgver
+
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python-niapy() {
+ depends=('python-scipy' 'python-click' 'python-xlsxwriter')
+
+ cd "$srcdir"/NiaPy-$pkgver
+
+ python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}