summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-cffi/PKGBUILD
blob: 5a4ef044b389b69bb6d4f65585dd5e9d84b0dafb (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
45
46
47
48
49
50
51
52
53
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: lilydjwg <lilydjwg@gmail.com>

pkgbase=python-cffi
pkgname=(python2-cffi)
pkgver=1.5.2
_revision=4640c7bfb3166763943b428bc7ae9d3585e45c34
pkgrel=1
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' 'mercurial')
checkdepends=('python2-pytest-runner')
source=("hg+https://felixonmars@bitbucket.org/cffi/cffi#revision=$_revision")
sha512sums=('SKIP')

prepare() {
  cp -a cffi{,-py2}
}

build() {
#  cd "$srcdir/cffi"
#  python3 setup.py build

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

check() {
  cd "$srcdir/cffi"
  python3 setup.py ptr

  cd "$srcdir/cffi-py2"
  python2 setup.py ptr
}

package_python-cffi() {
  depends=('python-pycparser')

  cd "$srcdir/cffi"
  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/cffi-py2"
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}