desktop/python-cffi/PKGBUILD
2017-10-27 00:01:37 +02:00

52 lines
1.2 KiB
Bash

pkgbase=python-cffi
pkgname=(python3-cffi python2-cffi)
pkgver=1.11.2
pkgrel=1
pkgdesc="Foreign Function Interface for Python calling C code"
arch=('x86_64')
url="http://cffi.readthedocs.org/"
license=('MIT')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-pycparser' 'python2-pycparser' 'mercurial')
checkdepends=('python3-pytest-runner' 'python2-pytest-runner')
source=("hg+https://felixonmars@bitbucket.org/cffi/cffi#revision=$_revision")
sha512sums=('SKIP')
prepare() {
mv cffi cffi-$pkgver
cp -a cffi-$pkgver{,-py2}
}
build() {
cd "$srcdir"/cffi-$pkgver
python3 setup.py build
cd "$srcdir"/cffi-$pkgver-py2
python2 setup.py build
}
check() {
cd "$srcdir"/cffi-$pkgver
python3 setup.py test
cd "$srcdir"/cffi-$pkgver-py2
python2 setup.py test
}
package_python3-cffi() {
depends=('python3-pycparser')
cd cffi-$pkgver
python3 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-cffi() {
depends=('python2-pycparser')
cd cffi-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}