summaryrefslogtreecommitdiff
path: root/dev-python/mpi4py
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/mpi4py
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/mpi4py')
-rw-r--r--dev-python/mpi4py/Manifest1
-rw-r--r--dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch20
-rw-r--r--dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch11
-rw-r--r--dev-python/mpi4py/metadata.xml25
-rw-r--r--dev-python/mpi4py/mpi4py-4.0.1.ebuild80
5 files changed, 137 insertions, 0 deletions
diff --git a/dev-python/mpi4py/Manifest b/dev-python/mpi4py/Manifest
new file mode 100644
index 000000000000..de66a3a0886f
--- /dev/null
+++ b/dev-python/mpi4py/Manifest
@@ -0,0 +1 @@
+DIST mpi4py-4.0.1.tar.gz 466179 BLAKE2B 4e678f08c257a32922914448c82d13c0a1e29aa1e39a1f669d8c2d766a1ecbd8bdf2bf3b12dae8eca9bf3846c096d0ecb0bbdb9147b3048acfe48e067d72161f SHA512 7721ef4f0859e90ca91d6911c3e5a897249f57c8b575065cdb1d537602ce0b30909f144b292c7d74013361cdf9e464cb0c16e408f37fd6c8c1554cbbe9785c05
diff --git a/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch b/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch
new file mode 100644
index 000000000000..82415dae491d
--- /dev/null
+++ b/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch
@@ -0,0 +1,20 @@
+diff --git a/src/lib-mpi/compat/mpich.h b/src/lib-mpi/compat/mpich.h
+index 2cd50c1..3ea9510 100644
+--- a/src/lib-mpi/compat/mpich.h
++++ b/src/lib-mpi/compat/mpich.h
+@@ -123,7 +123,6 @@ static int PyMPI_MPICH_MPI_Reduce_c(const void *sendbuf, void *recvbuf,
+
+ /* -------------------------------------------------------------------------- */
+
+-#if defined(CIBUILDWHEEL)
+
+ #define PyMPI_MPICH_CALL_WEAK_SYMBOL(function, ...) \
+ if (function) return function(__VA_ARGS__); \
+@@ -159,7 +158,6 @@ static int PyMPI_MPICH_MPI_Status_f2c(const MPI_Fint *fs, MPI_Status *cs)
+ { PyMPI_MPICH_CALL_WEAK_SYMBOL(MPI_Status_f2c, fs, cs); }
+ #define MPI_Status_f2c PyMPI_MPICH_MPI_Status_f2c
+
+-#endif
+
+ /* -------------------------------------------------------------------------- */
+
diff --git a/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch b/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch
new file mode 100644
index 000000000000..f8ba9bd474f5
--- /dev/null
+++ b/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch
@@ -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"
diff --git a/dev-python/mpi4py/metadata.xml b/dev-python/mpi4py/metadata.xml
new file mode 100644
index 000000000000..39026df7cad1
--- /dev/null
+++ b/dev-python/mpi4py/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>alex.fan.q@gmail.com</email>
+ <name>Alex Fan</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <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
+ and provides an object oriented interface which closely follows
+ MPI-2 C++ bindings. It supports point-to-point (sends, receives) and
+ collective (broadcasts, scatters, gathers) communications of any
+ picklable Python object as well as optimized communications of
+ Python object exposing the single-segment buffer interface (NumPy
+ arrays, builtin bytes/string/array objects).
+ </longdescription>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/mpi4py/mpi4py-4.0.1.ebuild b/dev-python/mpi4py/mpi4py-4.0.1.ebuild
new file mode 100644
index 000000000000..fd474ebb5b16
--- /dev/null
+++ b/dev-python/mpi4py/mpi4py-4.0.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+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"
+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"
+ "${FILESDIR}/${PN}-4-mpich-no-fortran-fix.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
+}