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

pkgname=python-numexpr
pkgver=2.10.1
pkgrel=1
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=('e499bd19a7fd9803d5ec1b2cff2e0a11a2f01a109d5326e5a09eff590448c793')

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/
}
