forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add python-mpi4py package (msys2#22247)
Add package: python-mpi4py
- Loading branch information
1 parent
8fa7614
commit fca044b
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Maintainer: ImperatorS79 <[email protected]> | ||
|
||
_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}/" | ||
} |