# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Contributor: Rafael G. Martins <rafael@rafaelmartins.com>
# Contributor: Iván Pulido <ijpulidos@riseup.net>

pkgname=python-mpmath
pkgver=1.4.1
pkgrel=1
pkgdesc='Python library for arbitrary-precision floating-point arithmetic.'
arch=(any)
url='http://mpmath.org/'
license=(BSD-3-Clause)
depends=(python
         python-gmpy2)
makedepends=(git
             python-build
             python-installer
             python-setuptools
             python-setuptools-scm
             python-wheel)
checkdepends=(python-hypothesis
              python-pexpect
              python-pytest)
source=(git+https://github.com/mpmath/mpmath#tag=$pkgver)
sha256sums=('b3a29e28236f55687720e3b3722791339f9bb6352c96afdfd6216157d5fcf123')

build() {
  cd mpmath
  python -m build --wheel --no-isolation
}

#check() {
#  cd mpmath
#  pytest -v
#}

package() {
  cd mpmath  
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
