core/python-mpmath/PKGBUILD
2017-10-27 00:00:45 +02:00

54 lines
1.3 KiB
Bash

# $Id$
# 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>
pkgbase=python-mpmath
pkgname=('python2-mpmath' 'python3-mpmath')
pkgver=1.0.0
pkgrel=1
pkgdesc='Python library for arbitrary-precision floating-point arithmetic.'
arch=('any')
url='http://mpmath.org/'
license=('BSD')
makedepends=('python' 'python2' 'python3-gmpy2' 'python2-gmpy2')
source=("http://mpmath.org/files/mpmath-${pkgver}.tar.gz")
md5sums=('bda30ab82e73cbaf470fb7b269617f9d')
prepare(){
cp -R mpmath-$pkgver mpmath2-$pkgver
}
build() {
cd mpmath2-$pkgver
python2 setup.py build
cd ../mpmath-$pkgver
python3 setup.py build
}
package_python2-mpmath() {
depends=('python2-gmpy2')
cd mpmath2-${pkgver}
find -name '*.py' | xargs sed -e 's|#!/usr/bin/python|#!/usr/bin/python2|' -i
python2 setup.py install --root "$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
}
package_python3-mpmath() {
depends=('python3-gmpy2')
cd mpmath-${pkgver}
python3 setup.py install --root "$pkgdir" --optimize=1
install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
}