desktop/python-sympy/PKGBUILD
AlmAck 08a66c4024 python3 rebuild for 3.5
new pkg added to fullfill checkdepends
new order file python3.order
2016-03-16 22:36:13 +01:00

59 lines
1.5 KiB
Bash

pkgbase=python-sympy
pkgname=('python2-sympy' 'python3-sympy')
pkgver=1.0
pkgrel=2
arch=('any')
pkgdesc='Symbolic manipulation package (Computer Algebra System), written in pure Python'
url='http://sympy.org/en/index.html'
license=('BSD')
makedepends=('python2-mpmath' 'python3-mpmath' 'python3-setuptools' 'python2-setuptools')
source=("https://github.com/sympy/sympy/archive/sympy-${pkgver}.tar.gz")
sha256sums=('bf6f4c6c79d7c0c5057f59274ab9c71ae1d35f1c9f979d1c9787ad54ef7cb282')
prepare() {
cp -a sympy{,-py2}
}
build() {
cd "$srcdir"/sympy
python2 setup.py build
cd "$srcdir"/sympy-py2
python3 setup.py build
}
check() {
cd "$srcdir"/sympy
python2 setup.py test
cd "$srcdir"/sympy-py2
python3 setup.py test
}
package_python2-sympy() {
depends=('python2-mpmath')
optdepends=('python2-pyglet: plotting'
'ipython2: user friendly interface for isympy')
cd sympy
python2 setup.py install --root "${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
package_python3-sympy() {
depends=('python3-mpmath')
optdepends=('ipython3: user friendly interface for isympy')
cd py3-sympy
python3 setup.py install --root "${pkgdir}" --optimize=1
# rename files that exists in both 'python2-sympy' and 'python3-sympy'
mv "${pkgdir}"/usr/bin/isympy{,-py3}
mv "${pkgdir}"/usr/share/man/man1/isympy{,-py3}.1
install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}