summaryrefslogtreecommitdiff
path: root/community/python-mpi4py/PKGBUILD
blob: aefaa821546eb818cbff03ec0914566021b7ef8b (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
# $Id: PKGBUILD 95616 2013-08-15 02:50:55Z fyan $
# Maintainer : Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sebastien Binet <binet@cern.ch>

pkgbase=python-mpi4py
pkgname=('python-mpi4py' 'python2-mpi4py')
pkgver=1.3.1
pkgrel=1
arch=('i686' 'x86_64')
url="http://mpi4py.scipy.org"
license=('BSD')
makedepends=('python' 'python2' 'python-distribute' 'python2-distribute' 'openmpi')
source=(http://mpi4py.googlecode.com/files/mpi4py-${pkgver}.tar.gz)

build() {
    cd "${srcdir}"
    cp -a mpi4py-${pkgver}{,-python2}

    # Build python 3 module
    cd mpi4py-${pkgver}
    python3 setup.py build

    # Build python 2 module
    cd ../mpi4py-${pkgver}-python2
    python2 setup.py build
}

package_python-mpi4py() {
    pkgdesc="Python bindings of the Message Passing Interface (MPI)"
    depends=('python>=3.3' 'openmpi')

    cd "${srcdir}/mpi4py-${pkgver}"
    python3 setup.py install --root "${pkgdir}" --optimize=1 --skip-build

    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}

package_python2-mpi4py() {
    pkgdesc="Python2 bindings of the Message Passing Interface (MPI)"
    depends=('python2>=2.7' 'openmpi')

    cd "${srcdir}/mpi4py-${pkgver}-python2"
    python2 setup.py install --root "${pkgdir}" --optimize=1 --skip-build

    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}

sha512sums=('15e81f2a1e6f6af7a54f0e8ec43ddf36cc565b7fe9e3dd35603c9d128199c5acd1584757ffca999c8826c0bbccf371175d40a7a24c85d3369efd77da5b3b603f')