desktop/python-rpy2/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

35 lines
1.1 KiB
Bash

pkgbase=python-rpy
pkgname=('python2-rpy2' 'python3-rpy2')
pkgver=2.7.8
pkgrel=2
pkgdesc="A very simple, yet robust, Python interface to the R Programming Language."
arch=('x86_64')
url="https://bitbucket.org/rpy2/rpy2"
license=('MPL' 'GPL' 'LGPL')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-numpy' 'python2-numpy' 'r')
source=("http://pypi.python.org/packages/source/r/rpy2/rpy2-$pkgver.tar.gz")
md5sums=('56ca162bca76bb9c3f935f099c916196')
prepare() {
cd rpy2-$pkgver
sed -i "s:Rlapack:lapack:" setup.py
sed -i "s:os.path.join(RHOME.strip(), 'include'):'/usr/include/R':" setup.py
sed -i "s:os.path.join(RHOME.strip(), 'include'):'/usr/include/R':" setup.py
}
package_python2-rpy2() {
depends=('python2-numpy' 'r' 'python2-singledispatch')
cd rpy2-$pkgver
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -i "$pkgdir"/usr/lib/python2.7/site-packages/rpy2/tests.py
}
package_python3-rpy2() {
depends=('python3-numpy' 'r')
cd rpy2-$pkgver
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}