summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e17f8e0319ca7c98fb6ead76a4fea84a77a7ed01 (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
# Contributor: Lex Black <autumn-wind@web.de>
# Contributor: Michel Zou

_name=pythran
pkgbase=python-pythran-git
pkgname=('python-pythran-git' 'python2-pythran-git')
pkgver=0.9.5.r5.g3671d777c
pkgrel=1
pkgdesc="claimless python to c++ converter"
arch=('i686' 'x86_64')
url="https://github.com/serge-sans-paille/pythran"
license=('BSD')
makedepends=('python-networkx' 'python2-networkx' 'python-ply' 'python2-ply' 'python-colorlog' 'python2-colorlog' 'python-numpy' 'python2-numpy' 'gperftools'  'python-setuptools' 'python2-setuptools' 'python-gast' 'python2-gast' 'python-six' 'python2-six' 'gmp' 'boost' 'git' 'cmake')
source=("git+https://github.com/serge-sans-paille/pythran.git")
md5sums=('SKIP')


pkgver() {
  cd "$_name"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cp -r "$srcdir"/${_name} "$srcdir"/${_name}-py2

  cd "${_name}"
  python setup.py build

  cd "${_name}"-py2
  python2 setup.py build
}

package_python-pythran-git() {
  depends=('python-networkx' 'python-ply' 'python-colorlog' 'python-numpy' 'python-gast' 'python-six' 'gperftools' 'gmp' 'boost')
  provides=('python-pythran')
  conflicts=('python-pythran')

  cd "${_name}"
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

package_python2-pythran-git() {
  depends=('python2-networkx' 'python2-ply' 'python2-colorlog' 'python2-numpy' 'python2-gast' 'python2-six' 'gperftools' 'gmp' 'boost')
  provides=('python2-pythran')
  conflicts=('python2-pythran')

  cd "${_name}"-py2
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  mv "$pkgdir"/usr/bin/pythran "$pkgdir"/usr/bin/pythran2
  mv "$pkgdir"/usr/bin/pythran-config "$pkgdir"/usr/bin/pythran2-config
}