# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Sebastien Binet <binet@lblbox>

pkgname=python-numexpr
pkgver=2.9.0
pkgrel=3
pkgdesc="Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas"
url="https://github.com/pydata/numexpr"
arch=(x86_64 aarch64)
license=(MIT)
depends=(python-numpy)
makedepends=(
    python-build
    python-installer
    python-setuptools
    python-wheel
)
source=(https://github.com/pydata/numexpr/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('4df4163fcab20030137e8f2aa23e88e1e42e6fe702387cfd95d7675e1d84645e')

prepare() {
  sed -i 's/, "oldest-supported-numpy"//' numexpr-$pkgver/pyproject.toml
}

build() {
  cd numexpr-$pkgver
  python -m build --wheel --no-isolation
}
package() {
  cd numexpr-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
