# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Omar Sandoval <osandov at cs dot washington dot edu>
# Contributor: Alexander Slesarev <slesarew at gmail dot com>

pkgname=python-gmpy2
pkgver=2.1.5
pkgrel=2
pkgdesc='Provides C-coded Python modules for fast multiple-precision arithmetic'
arch=(x86_64 aarch64)
url='https://github.com/aleaxit/gmpy'
license=(LGPL2.1)
depends=(python libmpc)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://github.com/aleaxit/gmpy/archive/refs/tags/gmpy2-$pkgver.tar.gz)
sha256sums=('ae9e4e0fa305b2693d7d32698b49426907724ffde31b01330a4051a8f5388e37')

build() {
  cd gmpy-gmpy2-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd gmpy-gmpy2-$pkgver 
  python -m installer --destdir="$pkgdir" dist/*.whl
 
  install -d -m 755 $pkgdir/usr/share/doc/$pkgname
  install -m 644 -t $pkgdir/usr/share/doc/$pkgname docs/*
}
