mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
# Maintainer: Samir Benmendil <samir.benmendil@gmail.com>
|
|
# Contributor: Felix Yan <felixonmars@gmail.com>
|
|
# Contributor: lilydjwg <lilydjwg@gmail.com>
|
|
|
|
_name=cffi
|
|
pkgbase=python-$_name
|
|
pkgname=(python3-$_name python2-$_name)
|
|
pkgver=0.8.6
|
|
pkgrel=2
|
|
pkgdesc="Foreign Function Interface for Python calling C code"
|
|
arch=('i686' 'x86_64')
|
|
url="http://cffi.readthedocs.org/"
|
|
license=('MIT')
|
|
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-pycparser' 'python2-pycparser')
|
|
checkdepends=('python3-pytest' 'python2-pytest')
|
|
source=("http://pypi.python.org/packages/source/c/${_name}/${_name}-${pkgver}.tar.gz")
|
|
sha512sums=('b913d459bf0d355f0cb42fa0587a940c227d6765450033b14ab4d5281173cd1875cd6872911bb4f0b567cc1c5b0ca330615ec5f6ba205b25c41b683ae8c77790')
|
|
|
|
prepare() {
|
|
cp -a $_name-$pkgver{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/$_name-$pkgver"
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir/$_name-$pkgver-py2"
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir/$_name-$pkgver"
|
|
PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-3.3:$PYTHONPATH" py.test
|
|
|
|
cd "$srcdir/$_name-$pkgver-py2"
|
|
PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-2.7:$PYTHONPATH" py.test2
|
|
}
|
|
|
|
package_python3-cffi() {
|
|
depends=('python3-pycparser')
|
|
|
|
cd "$srcdir/$_name-$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 "$srcdir/$_name-$pkgver-py2"
|
|
python2 setup.py install --root="$pkgdir/" --optimize=1
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|