summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-cffi/PKGBUILD
blob: 5f75a0e95ac5e79aebccf7d7c2428101131fe451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $Id$
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: lilydjwg <lilydjwg@gmail.com>

_name=cffi
pkgbase=python-$_name
pkgname=(python2-$_name)
pkgver=0.8.2
pkgrel=4
pkgdesc="Foreign Function Interface for Python calling C code"
arch=('i686' 'x86_64')
url="http://cffi.readthedocs.org/"
license=('MIT')
makedepends=('python2-setuptools' 'python2-pycparser')
md5sums=('37fc88c62f40d04e8a18192433f951ec')
source=("http://pypi.python.org/packages/source/c/${_name}/${_name}-${pkgver}.tar.gz")

prepare() {
  cp -r $_name-$pkgver{,-py2}
}

build() {
#  cd "$srcdir/$_name-$pkgver"
#  python3 setup.py build

  cd "$srcdir/$_name-$pkgver-py2"
  python2 setup.py build
}

#package_python-cffi() {
#  depends=('python' 'python-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' 'python2-pycparser')

  cd "$srcdir/$_name-$pkgver-py2"
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}