summaryrefslogtreecommitdiff
path: root/dev-python/mpi4py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-28 02:00:16 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-28 02:00:16 +0000
commita2148b9fab4c83209816a49f091d70873b19881d (patch)
treeaeeaea24918f3a0df7fc0e4e013c68df40469897 /dev-python/mpi4py
parentead7697a01fd631b56240b2d58aedd98ba7f92d3 (diff)
gentoo auto-resync : 28:11:2024 - 02:00:16
Diffstat (limited to 'dev-python/mpi4py')
-rw-r--r--dev-python/mpi4py/Manifest6
-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.xml3
-rw-r--r--dev-python/mpi4py/mpi4py-4.0.1.ebuild80
5 files changed, 118 insertions, 2 deletions
diff --git a/dev-python/mpi4py/Manifest b/dev-python/mpi4py/Manifest
index 8db9d0bed996..ca083e08e90e 100644
--- a/dev-python/mpi4py/Manifest
+++ b/dev-python/mpi4py/Manifest
@@ -1,4 +1,8 @@
AUX mpi4py-3.1.5-test_memory.testReadOnly.patch 1197 BLAKE2B ede5e0a7185e507ccd22714ae422a99ec77beddb72293a1402d364545453faddeb9835577bcd68ea9accc36d37d9488811ea5e00e74ef458d63f8aa44407b89c SHA512 dff934a684cd3758dac721741cfe625a25930d3af00f9386047c4f2344ec56238aef6e6a7335a9cb33f348e312210525c41d2f5088c0e6e3d7e84cbd14fe7a0c
+AUX mpi4py-4-mpich-no-fortran-fix.patch 776 BLAKE2B 07b1ca5cac5b18a064d04ef62e64bc7566a31b02867ff2e6553851aa4018731b3388bac00b5a1746b97246e58760969713d55ac95f0834e667d4be8a6a549aaa SHA512 ed309d9df53d49c1f91f8f58d64be253ff30288478a3663ae6ba31a27baf315e17e2bfe3fde4e0a131ae427741fd97f756e590d8c04dcd14d50108cd5548d7b5
+AUX mpi4py-4-use-mesonpy.patch 309 BLAKE2B a630c0619484608f569826758e103968dcb3fe9b568b006420162a19906796e0153b9da734138aa55aebb17a4542f1e598dfd1289a7a8a2b3f545c7fa111b879 SHA512 1ff2eb283789a669fc852f827ab3d1713afadea9266f943ba533d87e68741183b07836cd2aeb533a7ad9707787dfd7c1bead98a67852bb63552059c83b64078f
DIST mpi4py-3.1.5.tar.gz 2469777 BLAKE2B 0638e3def52f731b64e2999f83f2d6ccc94dc2f8b37d964c10e49ca12470d3d3ef77ff2737294d85614b2d59d1eec49880e74f2ba3d73fd090152b63c8cc701e SHA512 04da1d6daf66cc86fa3ec574eea6e01749f895035e3394afbc68d6245394c5b03557ede0bda3642b06d9c6ff2c1e6e878a6c8c30d3fa3491392e2e13b82cdec8
+DIST mpi4py-4.0.1.tar.gz 466179 BLAKE2B 4e678f08c257a32922914448c82d13c0a1e29aa1e39a1f669d8c2d766a1ecbd8bdf2bf3b12dae8eca9bf3846c096d0ecb0bbdb9147b3048acfe48e067d72161f SHA512 7721ef4f0859e90ca91d6911c3e5a897249f57c8b575065cdb1d537602ce0b30909f144b292c7d74013361cdf9e464cb0c16e408f37fd6c8c1554cbbe9785c05
EBUILD mpi4py-3.1.5.ebuild 1711 BLAKE2B 2cad08c0e4ab565831f3c3e6410df1e2356d455eef722e70ecd4f3b251df6fb3f3b20bdd0bf51af630be45a575fdcdf3b88a57bf2d3d4315dcd9d56fc8755017 SHA512 b5c9e4126f9d6bc4878ca46ec021c4ef1f9b3f6254c36fa94a22d457140a53161e8a76b4f25c21b34d6934f7cc8fb54beb0ae3769e2cbe6c5c2314fd8448abb3
-MISC metadata.xml 1229 BLAKE2B 1634ae0e35f9b9362e9b4eaf21443a1fe6c7fc54ec6e4cc5914695533a3563586371cde7b48e34dfcdad6dc5a89f49bec705e434e68353e93e122c272fa163f3 SHA512 d0892adce1d1b5253185a9b539d2dca2a0d4cc96ce7e6e5cfb0507a90fdc88d92d7c74fc6fc93e951872bcfad73d4071b403b7e4269081c55b18789f09b35226
+EBUILD mpi4py-4.0.1.ebuild 1753 BLAKE2B b9ae62c493786d9892bf245f32a2714f8fbe347130a21e8d015786bc4223f739a244407bf34746342d758e642345ecc915d2cc98f998c8c9ce4a303105305018 SHA512 2485e0a7e8971f425a8b85d819b2a8dd22a5915111e9f96043a3793537dd278b510a19b03ea723b7358ff3f0602e9c7cd57da39060f5d21c41f52015089350fd
+MISC metadata.xml 1232 BLAKE2B 5c115207c40d2d44532bda8910ffd914fa71b96c900358e993d62ecd3254dc5d43e0f8226057dfb875ce75b26e7a3600ff3f29e08ee65235c844dceee5aa0c31 SHA512 253599a15a496ce620f9d7169ee367f4a8e03739cc9641511ab477cc795c5d2e010268047233ab94ef3a64ad2e04a4d9cb7408c3367349206bf29b9873e32917
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
index 0dd4ceca2177..11c562b3c581 100644
--- a/dev-python/mpi4py/metadata.xml
+++ b/dev-python/mpi4py/metadata.xml
@@ -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
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..2082140a9e16
--- /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_{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"
+ "${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
+}