summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2022-01-10 16:11:48 -0500
committerCarlos Aznarán Laos2022-01-10 16:11:48 -0500
commit880705410a6e3c1c6578d9c9342142c71d09aad9 (patch)
tree07809feb576c3c81a2bce8b32528f60047bbb379 /PKGBUILD
parent2f47920808438fe839e009bd1793b856d9734d4f (diff)
downloadaur-880705410a6e3c1c6578d9c9342142c71d09aad9.tar.gz
Add prepare() function for install sucessfully
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 13 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cbd4e5201aaf..fc102b50c2ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,35 @@
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
-_base=niapy
-pkgname=python-${_base}
+_base=NiaPy
+pkgname=python-${_base,,}
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Python microframework for building nature-inspired algorithms"
url="https://${_base}.org"
arch=('any')
-license=('MIT')
+license=(MIT)
depends=(python-pandas python-matplotlib python-openpyxl)
checkdepends=(python-pytest)
-source=(https://github.com/niaorg/${_base}/archive/$pkgver.tar.gz)
+source=(https://github.com/NiaOrg/${_base}/archive/${pkgver}.tar.gz)
sha512sums=('77e8d16fd02671154605b21e4d32225ded0d53bd8e809d4f99d6449db33a915d669bb7c864935251c7842bfd8d0c20d30d77f2a8b538e03d104691f90553f034')
+prepare() {
+ # https://github.com/NiaOrg/NiaPy/issues/371
+ sed -i '/^ description/,+2d' "${_base}-${pkgver}/setup.py"
+}
+
build() {
- cd "NiaPy-${pkgver}"
+ cd "${_base}-${pkgver}"
python setup.py build
}
check() {
- cd "NiaPy-${pkgver}"
+ cd "${_base}-${pkgver}"
python -m pytest
}
package() {
- cd "NiaPy-${pkgver}"
+ cd "${_base}-${pkgver}"
export PYTHONHASHSEED=0
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"