archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-mpi4py / trunk / PKGBUILD
blob4fbeaf51de76de3e697c4e40bca20ab21a5421f4
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Anatol Pomozov
3 # Contributor: Tim Hütz <tim@huetz.biz>
4 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
5 # Contributor: Sebastien Binet <binet@cern.ch>
7 _pkg=mpi4py
8 pkgname=python-${_pkg}
9 pkgver=3.1.4
10 pkgrel=3
11 pkgdesc="Python bindings for the Message Passing Interface (MPI) standard"
12 arch=(x86_64)
13 url="https://github.com/mpi4py/mpi4py"
14 license=(BSD)
15 depends=(python openmpi)
16 makedepends=(python-setuptools cython)
17 checkdepends=(inetutils)
18 source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
19 sha256sums=('17858f2ebc623220d0120d1fa8d428d033dde749c4bc35b33d81a66ad7f93480')
21 build() {
22     cd ${_pkg}-${pkgver}
23     python setup.py build
26 check() {
27     # This is required starting with OpenMPI 3.0 when trying to run more
28     # processes than the number of available cores
29     export OMPI_MCA_rmaps_base_oversubscribe=yes
30     # We don’t have CUDA by default
31     export OMPI_MCA_opal_warn_on_missing_libcuda=0
33     cd ${_pkg}-${pkgver}
34     local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
35     PYTHONPATH="${PWD}"/build/lib.linux-$CARCH-cpython-${python_version/./} python setup.py test
38 package() {
39     cd ${_pkg}-${pkgver}
40     python setup.py install --root="${pkgdir}" --skip-build --optimize=1
41     install -Dm644 LICENSE.rst -t "${pkgdir}"/usr/share/licenses/${pkgname}/