49
mingw-w64-python-mpi4py/PKGBUILD
Normal file
49
mingw-w64-python-mpi4py/PKGBUILD
Normal file
@@ -0,0 +1,49 @@
|
||||
# Maintainer: ImperatorS79 <fevrier.simon@gmail.com>
|
||||
|
||||
_realname=mpi4py
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=4.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Python bindings for the Message Passing Interface (MPI) standard (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://mpi4py.github.io/stable/'
|
||||
msys2_references=(
|
||||
'pypi: mpi4py'
|
||||
)
|
||||
license=('spdx:BSD-3-Clause')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-cython"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
||||
"${MINGW_PACKAGE_PREFIX}-msmpi")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/mpi4py/mpi4py/releases/download/${pkgver}/mpi4py-${pkgver}.tar.gz")
|
||||
sha256sums=('f3174b245775d556f4fddb32519a2066ef0592edc810c5b5a59238f9a0a40c89')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}/"
|
||||
export MINGW_PATH=$(cygpath -m ${MINGW_PREFIX})
|
||||
sed -i 's@## mpi_dir = /usr/local/mpi@mpi_dir = '"${MINGW_PATH}"'@g' mpi.cfg
|
||||
sed -i 's@## mpicc = %(mpi_dir)s/bin/mpicc@mpicc = %(mpi_dir)s/bin/mpicc.exe@g' mpi.cfg
|
||||
sed -i 's@## mpicxx = %(mpi_dir)s/bin/mpicxx@mpicxx = %(mpi_dir)s/bin/mpicxx.exe@g' mpi.cfg
|
||||
sed -i 's@## include_dirs = %(mpi_dir)s/include@include_dirs = %(mpi_dir)s/include@g' mpi.cfg
|
||||
sed -i 's@## libraries = mpi@libraries = msmpi@g' mpi.cfg
|
||||
sed -i 's@## library_dirs = %(mpi_dir)s/lib@library_dirs = %(mpi_dir)s/lib@g' mpi.cfg
|
||||
#sed -i 's@## runtime_library_dirs = %(mpi_dir)s/lib@runtime_library_dirs = %(mpi_dir)s/bin@g' mpi.cfg
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}/"
|
||||
${MINGW_PREFIX}/bin/python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}/"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} --destdir="${pkgdir}" dist/*.whl
|
||||
install -Dm644 LICENSE.rst -t "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/"
|
||||
}
|
||||
Reference in New Issue
Block a user