mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 07:07:14 +08:00
56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
# Contributions from ArchLinux
|
|
|
|
_pkg=mpi4py
|
|
pkgbase=python-${_pkg}
|
|
pkgname=(python3-${_pkg} python2-${_pkg})
|
|
pkgver=3.0.0
|
|
pkgrel=2
|
|
pkgdesc="Python bindings for the Message Passing Interface (MPI) standard"
|
|
arch=(x86_64)
|
|
url="https://bitbucket.org/mpi4py/mpi4py"
|
|
license=(BSD)
|
|
makedepends=(python3-setuptools python2-setuptools openmpi)
|
|
checkdepends=(inetutils)
|
|
source=("https://pypi.io/packages/source/m/${_pkg}/${_pkg}-${pkgver}.tar.gz")
|
|
sha256sums=('b457b02d85bdd9a4775a097fac5234a20397b43e073f14d9e29b6cd78c68efd7')
|
|
|
|
prepare() {
|
|
cp -a ${_pkg}-${pkgver}{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd ${_pkg}-${pkgver}
|
|
python3 setup.py build
|
|
|
|
cd ../${_pkg}-${pkgver}-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
# This is required starting with OpenMPI 3.0 when trying to run more
|
|
# processes than the number of available cores
|
|
export OMPI_MCA_rmaps_base_oversubscribe=yes
|
|
|
|
cd ${_pkg}-${pkgver}
|
|
python3 setup.py test
|
|
|
|
cd ../${_pkg}-${pkgver}-py2
|
|
python2 setup.py test
|
|
}
|
|
|
|
package_python3-mpi4py() {
|
|
depends=(python3 openmpi)
|
|
|
|
cd ${_pkg}-${pkgver}
|
|
python3 setup.py install --root="${pkgdir}" --skip-build --optimize=1
|
|
install -Dm644 LICENSE.rst -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
|
}
|
|
|
|
package_python2-mpi4py() {
|
|
depends=(python2 openmpi)
|
|
|
|
cd ${_pkg}-${pkgver}-py2
|
|
python2 setup.py install --root="$pkgdir" --skip-build --optimize=1
|
|
install -Dm644 LICENSE.rst -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
|
}
|