mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 13:47:35 -08:00
dev-python/mpi4py: add 4.0.0
use meson-python as builder backend. don't force mpi[romio] and remove all excludes since those tests are skipped by upstream already Closes: https://bugs.gentoo.org/743448 Signed-off-by: Alex Fan <alex.fan.q@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
23d41733aa
commit
b8b09e7454
@ -1 +1,2 @@
|
||||
DIST mpi4py-3.1.5.tar.gz 2469777 BLAKE2B 0638e3def52f731b64e2999f83f2d6ccc94dc2f8b37d964c10e49ca12470d3d3ef77ff2737294d85614b2d59d1eec49880e74f2ba3d73fd090152b63c8cc701e SHA512 04da1d6daf66cc86fa3ec574eea6e01749f895035e3394afbc68d6245394c5b03557ede0bda3642b06d9c6ff2c1e6e878a6c8c30d3fa3491392e2e13b82cdec8
|
||||
DIST mpi4py-4.0.0.tar.gz 464833 BLAKE2B 86073c1ab0ff65dd38808390fa95056ac7dfd5f0802aff3d43313a83f07351ab83b97cb7d553fb4fa5133491971c5526246a10081a05bd9aaa6ff5669b214d1d SHA512 a90d82b976cb112d60fef8a53480a0ea977a2aca32e69f9869081f34ae0f0d4a6674340a534d501fad313c12ba593d2f34afa15d0a07e3baacb49483851644ae
|
||||
|
||||
11
dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch
Normal file
11
dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 8585f6d..5b0b2d8 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -1,4 +1,3 @@
|
||||
[build-system]
|
||||
-requires = ["setuptools >= 42", "build"]
|
||||
-build-backend = "builder"
|
||||
-backend-path = ["conf"]
|
||||
+requires = ["meson-python", "Cython"]
|
||||
+build-backend = "mesonpy"
|
||||
@ -9,7 +9,8 @@
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">MPI for Python (mpi4py) provides bindings of the Message Passing
|
||||
<longdescription lang="en">
|
||||
MPI for Python (mpi4py) provides bindings of the Message Passing
|
||||
Interface (MPI) standard for the Python programming language,
|
||||
allowing any Python program to exploit multiple processors.
|
||||
This package is constructed on top of the MPI-1/MPI-2 specification
|
||||
|
||||
79
dev-python/mpi4py/mpi4py-4.0.0.ebuild
Normal file
79
dev-python/mpi4py/mpi4py-4.0.0.ebuild
Normal file
@ -0,0 +1,79 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=meson-python
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Message Passing Interface for Python"
|
||||
HOMEPAGE="
|
||||
https://github.com/mpi4py/mpi4py
|
||||
https://pypi.org/project/mpi4py/
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc examples"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
virtual/mpi
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
>=dev-build/meson-1.0.0
|
||||
virtual/mpi
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-4-use-mesonpy.patch"
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# not needed on install
|
||||
rm -vr docs/source || die
|
||||
rm test/test_pickle.py || die # disabled by Gentoo-bug #659348
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
export CC=mpicc
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
echo "Beginning test phase"
|
||||
local -x PYTHONPATH="${BUILD_DIR}/install$(python_get_sitedir)"
|
||||
|
||||
# python want's all arguments as separate strings
|
||||
local mpi_opts=(
|
||||
"-n" "1"
|
||||
)
|
||||
if has_version sys-cluster/openmpi; then
|
||||
local mpi_opts+=(
|
||||
"--use-hwthread-cpus"
|
||||
# allow test in systemd-nspawn container
|
||||
"--mca" "btl" "tcp,self"
|
||||
"--mca" "oob_tcp_if_include" "lo"
|
||||
# disable openmpi OSC UCX component
|
||||
# https://github.com/open-mpi/ompi/issues/12517
|
||||
"--mca" "osc" "^ucx"
|
||||
)
|
||||
fi
|
||||
mpiexec \
|
||||
"${mpi_opts[@]}" \
|
||||
"${PYTHON}" -B -v ./test/runtests.py -v ||
|
||||
die "Testsuite failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/. )
|
||||
use examples && local DOCS=( demo )
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user